Hacker News new | ask | show | jobs
by jabbanobodder 3118 days ago
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.
2 comments

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.