prefixWith prefixes every element in the slice with the given prefix.
(prefix string, values []string)
| 120 | |
| 121 | // prefixWith prefixes every element in the slice with the given prefix. |
| 122 | func prefixWith(prefix string, values []string) []string { |
| 123 | result := make([]string, len(values)) |
| 124 | for i, v := range values { |
| 125 | result[i] = prefix + v |
| 126 | } |
| 127 | return result |
| 128 | } |
| 129 | |
| 130 | // postfixWith appends postfix to every element in the slice. |
| 131 | func postfixWith(postfix string, values []string) []string { |
no outgoing calls
no test coverage detected
searching dependent graphs…