github.com/Uhtred009/v2ray-core-1@v4.31.2+incompatible/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  }