neoneo-go/cli/flags/util.go
Evgenii Stratonikov 9be4312d8d cli: implement AddressFlag
This makes code less verbose and performs all parsing
before invoking main function.
2020-03-06 13:50:34 +03:00

11 lines
201 B
Go

package flags
import "strings"
func eachName(longName string, fn func(string)) {
parts := strings.Split(longName, ",")
for _, name := range parts {
name = strings.Trim(name, " ")
fn(name)
}
}