Browse Source

feat: support bee workspace specify

support bee workspace specify instead of current path only
pull/498/head
xhzhang 2 years ago
parent
commit
fdf0e9c768
1 changed files with 7 additions and 2 deletions
  1. +7
    -2
      main.go

+ 7
- 2
main.go View File

@ -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
}

Loading…
Cancel
Save