codeowners-validator icon indicating copy to clipboard operation
codeowners-validator copied to clipboard

Move to cobra library.

Open mszostok opened this issue 6 years ago • 2 comments

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-validator as CLI
  • user can specify configuration via cli flags
  • user can specify configuration via env variables

mszostok avatar Nov 13 '19 09:11 mszostok

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.

klauern avatar Apr 29 '20 13:04 klauern

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! 👍

mszostok avatar May 04 '20 14:05 mszostok