(names []string, placeholder string)
| 35 | } |
| 36 | |
| 37 | func prefixedNames(names []string, placeholder string) string { |
| 38 | var prefixed strings.Builder |
| 39 | for i, name := range names { |
| 40 | if name == "" { |
| 41 | continue |
| 42 | } |
| 43 | |
| 44 | prefixed.WriteString(prefixFor(name) + name) |
| 45 | if placeholder != "" { |
| 46 | prefixed.WriteString(" " + placeholder) |
| 47 | } |
| 48 | if i < len(names)-1 { |
| 49 | prefixed.WriteString(", ") |
| 50 | } |
| 51 | } |
| 52 | return prefixed.String() |
| 53 | } |
| 54 | |
| 55 | func envFormat(envVars []string, prefix, sep, suffix string) string { |
| 56 | if len(envVars) > 0 { |
no test coverage detected