go-common/library/conf/flagvar/flagvar.go

19 lines
289 B
Go
Raw Normal View History

2019-04-22 10:49:16 +00:00
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
}