github.com/criyle/go-sandbox@v0.10.3/cmd/runprog/array_flags.go (about)

     1  package main
     2  
     3  import "fmt"
     4  
     5  type arrayFlags []string
     6  
     7  func (f *arrayFlags) String() string {
     8  	return fmt.Sprint([]string(*f))
     9  }
    10  
    11  func (f *arrayFlags) Set(value string) error {
    12  	*f = append(*f, value)
    13  	return nil
    14  }