Re:Why I love Go
by jabbanobodder on Tuesday December 05, 2017 @05:26PM
(#15856630)
I often fell the same way about flag, recently I started using [go-args](https://godoc.org/github.com/alexflint/go-arg#example-packag...) and so far I've found that it works a bit smoother.
[ Parent
| on HN ]
Re:Why I love Go
by incompatible on Tuesday December 05, 2017 @06:39PM
(#15857240)
I like https://godoc.org/github.com/jessevdk/go-flags, since it also supports environment variables. It's nice to be able to get configurable defaults from the environment and still be able to override them on the command line.
I maintain an application that used a similar custom flag package. I am in the middle of porting it back to the stdlib one, (A) for consistency with the wider ecosystem and (B) to avoid reflecting on struct tags.