prefixWith prefixes every element in the slice with the given prefix.
(prefix string, values []string)
| 331 | |
| 332 | // prefixWith prefixes every element in the slice with the given prefix. |
| 333 | func prefixWith(prefix string, values []string) []string { |
| 334 | result := make([]string, len(values)) |
| 335 | for i, v := range values { |
| 336 | result[i] = prefix + v |
| 337 | } |
| 338 | return result |
| 339 | } |
| 340 | |
| 341 | // postfixWith appends postfix to every element in the slice. |
| 342 | func postfixWith(postfix string, values []string) []string { |
no outgoing calls
no test coverage detected
searching dependent graphs…