From 9e31a727a6f8075e77714e60719daffce4c648aa Mon Sep 17 00:00:00 2001 From: Kris Nova Date: Sat, 9 Dec 2017 06:56:16 -0600 Subject: [PATCH] Cleaning up program UX - Remove toggle flag - Update version message - Update README.md with new changes --- README.md | 3 +-- cmd/root.go | 2 +- cmd/version.go | 9 ++------- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 771fdb0a7..1b7956a9a 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ Usage: Available Commands: help Help about any command - version A brief description of your command + version Show the version of the program Flags: -h, --help help for virtual-kubelet @@ -65,7 +65,6 @@ Flags: --provider string cloud provider --provider-config string cloud provider configuration file --taint string apply taint to node, making scheduling explicit - -t, --toggle Help message for toggle Use "virtual-kubelet [command] --help" for more information about a command. ``` diff --git a/cmd/root.go b/cmd/root.go index 6d597d1a0..4f1c9920a 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -81,7 +81,7 @@ func init() { // Cobra also supports local flags, which will only run // when this action is called directly. - RootCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle") + // RootCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle") } // initConfig reads in config file and ENV variables if set. diff --git a/cmd/version.go b/cmd/version.go index 67466c15b..97bcd30d0 100644 --- a/cmd/version.go +++ b/cmd/version.go @@ -24,13 +24,8 @@ import ( // versionCmd represents the version command var versionCmd = &cobra.Command{ Use: "version", - Short: "A brief description of your command", - Long: `A longer description that spans multiple lines and likely contains examples -and usage of using your command. For example: - -Cobra is a CLI library for Go that empowers applications. -This application is a tool to generate the needed files -to quickly create a Cobra application.`, + Short: "Show the version of the program", + Long: `Show the version of the program`, Run: func(cmd *cobra.Command, args []string) { fmt.Printf("Version: %s, Built: %s", version.Version, version.BuildTime) },