3 ms·
> Go’s [...] intentionally deviates from the conventions. Sigh Of course if does.
by ohazi 6y ago
> Go’s [...] intentionally deviates from the conventions.
Sigh
Of course if does.
- trasz 6y agoGo -options sound like what X11 uses.
- programd 6y agoMy impression is that nobody bothers with the Go flags package and most people use the POSIX compatible pflag [1] library for argument parsing, usually via the awsome cobra [2] cli framework. Or they just use viper [3] for both command line and general configuration handling. No point reinventing the wheel or trying to remember some weird non-standard quirks. [1] https://github.com/spf13/pflag https://github.com/spf13/pflag [2] https://github.com/spf13/cobra https://github.com/spf13/cobra [3] https://github.com/spf13/viper https://github.com/spf13/viper
- akdor1154 6y agoNobody.. except Hashicorp :(
- DangitBobby 6y agoI always wondered who to blame for the single - long arguments in terraform.
- crehn 6y agoWell it does keep things simple, and as a side effect removes the cognitive burden of choosing a certain argument style (for both the developer and user).
- DangitBobby 6y agoIt definitely doesn't make things simpler. Maybe in a vacuum, it would have been simpler. But it's not in a vacuum, and it breaks with well established conventions, so we have to remember which special snowflake programs decided not to do what we expect.