yao/cmd/version.go
2021-10-18 00:39:26 +08:00

18 lines
312 B
Go

package cmd
import (
"fmt"
"github.com/spf13/cobra"
"github.com/yaoapp/xiang/share"
)
var versionCmd = &cobra.Command{
Use: "version",
Short: "显示当前版本号",
Long: `显示当前版本号`,
Run: func(cmd *cobra.Command, args []string) {
// Do Stuff Here
fmt.Println(share.VERSION)
},
}