type StringsValue … // Set parses a command line set of strings, separated by comma. // Implements "flag.Value" interface. func (ss *StringsValue) Set(s string) error { … } // String implements "flag.Value" interface. func (ss *StringsValue) String() string { … } // NewStringsValue implements string slice as "flag.Value" interface. // Given value is to be separated by comma. func NewStringsValue(s string) (ss *StringsValue) { … } // StringsFromFlag returns a string slice from the flag. func StringsFromFlag(fs *flag.FlagSet, flagName string) []string { … }