25개 이상의 토픽을 선택하실 수 없습니다.
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
438 B
20 lines
438 B
package cmd
|
|
|
|
import (
|
|
"fmt"
|
|
"github.com/spf13/cobra"
|
|
"github.com/ztino/jd_seckill/common"
|
|
"runtime"
|
|
)
|
|
|
|
func init() {
|
|
rootCmd.AddCommand(versionCmd)
|
|
}
|
|
|
|
var versionCmd = &cobra.Command{
|
|
Use: "version",
|
|
Short: "Print the version number of jd_seckill",
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
fmt.Println(fmt.Sprintf("%s version %s%s %s/%s",common.SoftName,common.SoftName,common.Version,runtime.GOOS,runtime.GOARCH))
|
|
},
|
|
}
|