3 ms·
I'm fairly certain you can use `--flag` with the standard flag package from stdlib: https://godoc.org/flag https://godoc.org/flag (in the section on command lin
by tynorf 9y ago
I'm fairly certain you can use `--flag` with the standard flag package from stdlib: https://godoc.org/flag https://godoc.org/flag (in the section on command line flag syntax).
Though supporting `-flag` does remove the very nice combining of short flags.
- lobster_johnson 9y agoInteresting, I didn't know that. I never liked the flag package, and the downside you mention is a reason not to use it. Kingpin (used by the Prometheus projects) and go-flags are nicer. Lots of Google code uses spf13's pflag, which I'm not a fan of, but it does do GNU flags correctly.