refactoring, adding cli to edit config
This commit is contained in:
18
cmd/cli/flag/flag.go
Normal file
18
cmd/cli/flag/flag.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package flag
|
||||
|
||||
import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
type Array []string
|
||||
|
||||
// String is an implementation of the flag.Value interface
|
||||
func (i *Array) String() string {
|
||||
return strings.Join(*i, ", ")
|
||||
}
|
||||
|
||||
// Set is an implementation of the flag.Value interface
|
||||
func (i *Array) Set(value string) error {
|
||||
*i = append(*i, value)
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user