You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
289 B
19 lines
289 B
6 years ago
|
package flagvar
|
||
|
|
||
|
import (
|
||
|
"strings"
|
||
|
)
|
||
|
|
||
|
// StringVars []string implement flag.Value
|
||
|
type StringVars []string
|
||
|
|
||
|
func (s StringVars) String() string {
|
||
|
return strings.Join(s, ",")
|
||
|
}
|
||
|
|
||
|
// Set implement flag.Value
|
||
|
func (s *StringVars) Set(val string) error {
|
||
|
*s = append(*s, val)
|
||
|
return nil
|
||
|
}
|