mirror of
https://github.com/beego/bee.git
synced 2024-11-21 23:50:54 +00:00
36 lines
584 B
Go
36 lines
584 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"log"
|
|
"os/exec"
|
|
|
|
"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)
|
|
goversion, err := exec.Command("go", "version").Output()
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
fmt.Println("Go :" + string(goversion))
|
|
}
|