Cleaning up program UX

- Remove toggle flag
- Update version message
- Update README.md with new changes
This commit is contained in:
Kris Nova
2017-12-09 06:56:16 -06:00
parent 899b07c1f4
commit 5c5e6adb9e
2 changed files with 3 additions and 8 deletions

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)
}, },