OSDN Git Service
(root)
/
bytom
/
vapor.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
new repo
[bytom/vapor.git]
/
cmd
/
vapor
/
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
}