htmltest icon indicating copy to clipboard operation
htmltest copied to clipboard

CLI / Config management refactor using better tools

Open wjdp opened this issue 6 years ago • 1 comments

The config has gotten more complex and we're outgrowing what we have now and am having to do a few hacks to keep it going.

Have a look at spf13 libs:

  • https://github.com/spf13/viper
  • https://github.com/spf13/cobra

wjdp avatar Jan 27 '18 23:01 wjdp

I'm currently using cobra in another project and quite liking it as a CLI builder. My one comment is that it is somewhat difficult to test against and you end up with CLI functions that just act as wrappers to an actual function making sure arguments end up in the right place. Haven't had much experience with viper yet but it looks equally as promising.

tomtom5152 avatar Jan 28 '18 00:01 tomtom5152