package cmd import ( "fmt" "github.com/spf13/cobra" ) func init() { RootCmd.AddCommand(versionCmd) } var versionCmd = &cobra.Command{ Use: "version", Short: "Print the version number of ChenJian", Long: `All software has versions. This is Hugo's`, Run: func(cmd *cobra.Command, args []string) { fmt.Println("Chen Jian Version: v1.0 -- HEAD") }, }