Move to cobra library.
Description
Currently the codeowners-validator allows you to specify the configuration only via environment variables.
Moving to cobra library will allow us to use the codeowners-validator as a full CLI app.
Acceptance Criteria
- user can user
codeowners-validatoras CLI - user can specify configuration via cli flags
- user can specify configuration via env variables
Can I suggest urfave/cli(v2) instead?
I think Cobra is a bit overkill unless you have a rich set of sub-commands, parameters, flags, etc., and ends up being a pain to maintain if you only have a couple options. I have found for smaller projects that urfave/cli is a lot easier.
To add to it, it was recently released with a V2 so it's under active development again.
Hi @klauern thanks for that suggestion. I also think that cobra is quite overkilling but it provides autocompletion, generating documentation from code etc., working with the configuration from different sources and I know it from some CLIs such as docker, k8s.
But first, look at urfave/cli is really promising and I will definitely do the comparison and consider to choose the simplest one :) thanks for heads up! 👍