package tools import ( "github.com/spf13/cobra" ) var Version string = "0.1.24" var Maincmd = &cobra.Command{ Use: "", Short: "Victorique's Small Smart Toolkit", Long: "Victorique's Small Smart Toolkit", } func init() { cobra.MousetrapHelpText = "" Maincmd.Flags().BoolP("version", "v", false, "查看版本号") Maincmd.Version = Version }