1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
package main import "strings" // stringSliceFlag collects repeated string flags. type stringSliceFlag []string func (f *stringSliceFlag) String() string { return strings.Join(*f, ",") } func (f *stringSliceFlag) Set(value string) error { *f = append(*f, value) return nil }