package version import ( "fmt" "git.cestong.com.cn/cecf/hx-admin-server/common/global" "github.com/spf13/cobra" ) var ( StartCmd = &cobra.Command{ Use: "version", Short: "Get version info", Example: "go-admin version", PreRun: func(cmd *cobra.Command, args []string) { }, RunE: func(cmd *cobra.Command, args []string) error { return run() }, } ) func run() error { fmt.Println(global.Version) return nil }