version.go 326 字节
Newer Older
P
Phodal Huang 已提交
1 2 3 4
package cmd

import (
	"fmt"
P
Phodal Huang 已提交
5
	"github.com/phodal/coca/config"
P
Phodal Huang 已提交
6 7 8 9 10 11 12 13 14
	"github.com/spf13/cobra"
)

func init() {
	rootCmd.AddCommand(versionCmd)
}

var versionCmd = &cobra.Command{
	Use:   "version",
P
Phodal Huang 已提交
15
	Short: "version",
P
Phodal Huang 已提交
16 17 18 19
	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("Coca Version: " + config.VERSION + " -- HEAD")
	},
}