lakruzz / gh-phlow

This repository is a template for our default Github issues developer workflow in Praqma
3 stars 2 forks source link

research how to add getOptions for GO #25

Closed groenborg closed 7 years ago

groenborg commented 7 years ago

kig på Perls (POD)

groenborg commented 7 years ago

https://github.com/DavidGamba/go-getoptions go implementation

groenborg commented 7 years ago

https://golang.org/pkg/flag/ https://github.com/clagraff/argparse

groenborg commented 7 years ago

after looking at both argparse, go-getoptions, cobra and docopt; I think cobra is the best option.. It's widely used by some of the most popular tools and maintained. Also it provides great documentation and gives what seem to be a great framework.

groenborg commented 7 years ago

Cobra has its own cli for generating boilerplate code for individual commands

groenborg commented 7 years ago

research is needed to figure out how cobra handle errors. docopt only provides the POSIX explanation for errored commands.

groenborg commented 7 years ago

Cobra have great error messages and suggestions for type errors.

groenborg commented 7 years ago

Shell completion is something we also want to consider! Cobras --help feature is really nice (and free) Kubernetes implementation os cobra has zsh shell autocomplete (so the option is viable)