OSDN Git Service

91c2622408ca87ab24115e05f9a03c01c148374a
[bytom/vapor.git] / cmd / bytomd / commands / version.go
1 package commands
2
3 import (
4         "fmt"
5
6         "github.com/spf13/cobra"
7
8         "github.com/vapor/version"
9 )
10
11 var versionCmd = &cobra.Command{
12         Use:   "version",
13         Short: "Show version info",
14         Run: func(cmd *cobra.Command, args []string) {
15                 fmt.Println(version.Version)
16         },
17 }
18
19 func init() {
20         RootCmd.AddCommand(versionCmd)
21 }