1
0
mirror of https://github.com/beego/bee.git synced 2025-07-05 18:20:18 +00:00

bee support version command

This commit is contained in:
astaxie
2014-05-17 01:37:45 +08:00
parent 244f27afdf
commit 226b5d4f4d
2 changed files with 31 additions and 0 deletions

28
version.go Normal file
View File

@ -0,0 +1,28 @@
package main
import (
"fmt"
"github.com/astaxie/beego"
)
var cmdVersion = &Command{
UsageLine: "version",
Short: "show the bee & beego version",
Long: `
show the bee & beego version
bee version
bee: 1.1.1
beego: 1.2
`,
}
func init() {
cmdVersion.Run = versionCmd
}
func versionCmd(cmd *Command, args []string) {
fmt.Println("bee:" + version)
fmt.Println("beego:" + beego.VERSION)
}