SliceValue is a secondary interface to all flags which hold a list of values. This allows full control over the value of list flags, and avoids complicated marshalling and unmarshalling to csv.
| 217 | // of values. This allows full control over the value of list flags, |
| 218 | // and avoids complicated marshalling and unmarshalling to csv. |
| 219 | type SliceValue interface { |
| 220 | // Append adds the specified value to the end of the flag value list. |
| 221 | Append(string) error |
| 222 | // Replace will fully overwrite any data currently in the flag value list. |
| 223 | Replace([]string) error |
| 224 | // GetSlice returns the flag value list as an array of strings. |
| 225 | GetSlice() []string |
| 226 | } |
| 227 | |
| 228 | // sortFlags returns the flags as a slice in lexicographical sorted order. |
| 229 | func sortFlags(flags map[NormalizedName]*Flag) []*Flag { |
no outgoing calls
no test coverage detected