dropEmpty list takes a slice of string pointers, and outputs a slice of non-empty strings associated with the flag.
(list []*string)
| 187 | // dropEmpty list takes a slice of string pointers, and outputs a slice of |
| 188 | // non-empty strings associated with the flag. |
| 189 | func dropEmpty(list []*string) []string { |
| 190 | var l []string |
| 191 | for _, s := range list { |
| 192 | if *s != "" { |
| 193 | l = append(l, *s) |
| 194 | } |
| 195 | } |
| 196 | return l |
| 197 | } |
| 198 | |
| 199 | // installConfigFlags creates command line flags for configuration |
| 200 | // fields and returns a function which can be called after flags have |
no outgoing calls
no test coverage detected
searching dependent graphs…