mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-12-23 13:41:37 +00:00
9be4312d8d
This makes code less verbose and performs all parsing before invoking main function.
11 lines
201 B
Go
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)
|
|
}
|
|
}
|