fmt.Sprint/Sprintf
SCC-S1039436
437 var v structs.ResourceTypes
438
439 err = c.Options(fmt.Sprintf("/resources"), ro, &v)440
441 return v, err
442}
424
425 var v structs.Resources
426
427 err = c.Get(fmt.Sprintf("/resources"), ro, &v)428
429 return v, err
430}
376
377 var v *structs.Resource
378
379 err = c.Post(fmt.Sprintf("/resources"), ro, &v)380
381 return v, err
382}
121
122 var v *structs.Certificate
123
124 err = c.Post(fmt.Sprintf("/certificates"), ro, &v)125
126 return v, err
127}
12
13 for _, s := range m.Services {
14 if len(s.Volumes) > 0 {
15 errs = append(errs, fmt.Sprintf("shared volumes are not supported on gcp"))16 break
17 }
18 }
fmt.Sprint
is not needed when there is only one literal string argument to the
function. Similarly, fmt.Sprintf
is not required when the string to be
formatted does not contain any format specifiers.
x := fmt.Sprint("hello")
y := fmt.Sprintf("Say what")
x := "hello"
y := "Say what"