Merge pull request #18 from kris-nova/clean-up-ux

Cleaning up program UX
This commit is contained in:
listonb
2017-12-09 17:42:23 -08:00
committed by GitHub
3 changed files with 4 additions and 10 deletions

View File

@@ -54,7 +54,7 @@ Usage:
Available Commands: Available Commands:
help Help about any command help Help about any command
version A brief description of your command version Show the version of the program
Flags: Flags:
-h, --help help for virtual-kubelet -h, --help help for virtual-kubelet
@@ -65,7 +65,6 @@ Flags:
--provider string cloud provider --provider string cloud provider
--provider-config string cloud provider configuration file --provider-config string cloud provider configuration file
--taint string apply taint to node, making scheduling explicit --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. Use "virtual-kubelet [command] --help" for more information about a command.
``` ```

View File

@@ -81,7 +81,7 @@ func init() {
// Cobra also supports local flags, which will only run // Cobra also supports local flags, which will only run
// when this action is called directly. // 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. // initConfig reads in config file and ENV variables if set.

View File

@@ -24,13 +24,8 @@ import (
// versionCmd represents the version command // versionCmd represents the version command
var versionCmd = &cobra.Command{ var versionCmd = &cobra.Command{
Use: "version", Use: "version",
Short: "A brief description of your command", Short: "Show the version of the program",
Long: `A longer description that spans multiple lines and likely contains examples Long: `Show the version of the program`,
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.`,
Run: func(cmd *cobra.Command, args []string) { Run: func(cmd *cobra.Command, args []string) {
fmt.Printf("Version: %s, Built: %s", version.Version, version.BuildTime) fmt.Printf("Version: %s, Built: %s", version.Version, version.BuildTime)
}, },