go-utils
go-utils copied to clipboard
cmd version and update check util
as common patterns emerge in our cli's it would be good to bundle those insights in a cli util
in particular
-
--version
flag- must have zero external dependencies
- this has been an issue in squash (trys to create kube resources) and supergloo (trys to download deleted repo file)
- config file management (a
~/.soloio/
dir perhaps) - update check/checkpoint
- configured for ease of integration with
brew
and other package managers - @scranton can advise
- --help (like --version) should also work without external dependencies like requiring a kube context just to print out the help message.
- may want to look at a common convention (not sure there's shared implementation; perhaps shared util functions) for getting the version of the cli tool (e.g. --version) AND getting the version of the installed tech, i.e., glooctl --version can be different than the version of gloo images installed in current kube context. For example, kubectl seems to have a convention of printing out a client version and a server version.
- Homebrew discourages managed packages from having their own upgrade capability as that breaks package management that homebrew is doing, i.e., actual version can change without letting homebrew know.
- command line completion is a nice to have, and I imagine there are shared utils like shell functions to fetch names of Kubernetes objects relevant for specific command context.
I see the above as nice-to-have polish on our cli tools. If shared utils help us enhance the quality for less overall work, then I'm all for helping make that happen.
Thanks, Scott
Scott Cranton Solo.io https://www.solo.io/ | Customer Success [email protected] +1.781.929.0056
On Mon, Apr 1, 2019 at 7:52 AM Mitch Kelley [email protected] wrote:
as common patterns emerge in our cli's it would be good to bundle those insights in a cli util
in particular
- --version flag
- must have zero external dependencies
- this has been an issue in squash (trys to create kube resources) and supergloo (trys to download deleted repo file https://github.com/solo-io/supergloo/issues/318)
- config file management (a ~/.soloio/ dir perhaps)
- update check/checkpoint
- configured for ease of integration with brew and other package managers - @scranton https://github.com/scranton can advise
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/solo-io/go-utils/issues/94, or mute the thread https://github.com/notifications/unsubscribe-auth/AAYWV7Sc3oaiZT91wliOw16VnV7naU6dks5vcfMEgaJpZM4cVhhW .
Oops