Closed damianoneill closed 6 years ago
will move to this.
To save you some time, cobra includes a cmd line generator as part of the package that will generate the boilerplate for your cli. See here https://github.com/spf13/cobra/blob/master/cobra/README.md
If you are going to use Cobra, you should consider https://github.com/spf13/viper (sister project) for configuration. I assume we will want to do a fair bit of configuration via the environment? If so viper makes this very easy in go.
If you are going to look at Viper, see https://github.com/theherk/viper fork which includes the ability to write the configuration to a local file system, not just reading the configuration.
Thank you for info. I'm already using viper for configuration.
"Cobra is a really clean package. I wish my own CLI library was as good!" - Jeremy Saenz (author of codegangsta/cli)
Kube, Openshift and most of our golang utilities have moved from urfave to cobra over the last 12 months. Worth checking it out.
https://github.com/spf13/cobra