grafana-tools / grafana-backup

[ON HOLD] CLI tool for backup/restore Grafana dashboards and datasources.
GNU General Public License v3.0
28 stars 3 forks source link

Switch to kingpin for command line options #4

Open omadawn opened 6 years ago

omadawn commented 6 years ago

As a Linux guy I am a little uncomfortable with the typical go flag format of a single dash and a long option name.

Kingpin https://github.com/alecthomas/kingpin would allow us to do the more universal format of having a single dash single letter as well as a double dash long format I.E. -h --help

It might also resolve issue #3

I can do this amongst the additional stuff I'm doing myself I just want to make sure you agree first.

grafov commented 6 years ago

I am also Linux user but during my work with Go I finally found reasonable their way for flag parsing with its roots in plan9 conventions. But I agree for Linux users these conventions may look unfamiliar. So I think moving to external parsing library is not a mandatory step but it will be good for the utility ergonomics. kingpin is well known package so it is ok for moving to it. So I would like to accept PR with the migration to kingpin usage.

omadawn commented 6 years ago

Cool, I'll probably implement it after a few of the other PRs you'll see from me.