github.com/xmplusdev/xmcore@v1.8.11-0.20240412132628-5518b55526af/common/cmdarg/cmdarg.go (about) 1 package cmdarg 2 3 import "strings" 4 5 // Arg is used by flag to accept multiple argument. 6 type Arg []string 7 8 func (c *Arg) String() string { 9 return strings.Join([]string(*c), " ") 10 } 11 12 // Set is the method flag package calls 13 func (c *Arg) Set(value string) error { 14 *c = append(*c, value) 15 return nil 16 }