feat: support bee workspace specify

support bee workspace specify instead of current path only
This commit is contained in:
xhzhang 2017-12-21 23:32:40 +08:00
부모 1937c6ddb7
커밋 fdf0e9c768
1개의 변경된 파일7개의 추가작업 그리고 2개의 파일을 삭제

파일 보기

@ -25,9 +25,15 @@ import (
"github.com/beego/bee/utils"
)
var (
workspace = os.Getenv("BeeWorkspace")
)
func main() {
currentpath, _ := os.Getwd()
if workspace != "" {
currentpath = workspace
}
flag.Usage = cmd.Usage
flag.Parse()
log.SetFlags(0)
@ -66,7 +72,6 @@ func main() {
if utils.IsInGOPATH(currentpath) && cmd.IfGenerateDocs(c.Name(), args) {
swaggergen.ParsePackagesFromDir(currentpath)
}
os.Exit(c.Run(c, args))
return
}