How can I pass string slices into Kingpin?

Viewed 302

Here's the minimal example:

import "gopkg.in/alecthomas/kingpin.v2"
...
fooCodes = kingpin.Flag("foo_codes", "List of codes").Default().Strings()

and I tried passing --foo_codes=AA,BB,CC that didn't work unfortunately so I had to use

--foo_codes=AA
--foo_codes=BB
--foo_codes=CC

instead as a workaround (I'm passing those args in a yaml file. Is there a better option that I can configure via kingpin?

1 Answers
Related