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