mirror of
https://github.com/beego/bee.git
synced 2025-07-09 15:00:18 +00:00
Internalize parsePackagesFromDir()
This commit is contained in:
15
main.go
15
main.go
@ -21,19 +21,10 @@ import (
|
||||
"github.com/beego/bee/cmd"
|
||||
"github.com/beego/bee/cmd/commands"
|
||||
"github.com/beego/bee/config"
|
||||
"github.com/beego/bee/generate/swaggergen"
|
||||
"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,12 +57,6 @@ func main() {
|
||||
}
|
||||
|
||||
config.LoadConfig()
|
||||
|
||||
// Check if current directory is inside the GOPATH,
|
||||
// if so parse the packages inside it.
|
||||
if cmd.IfGenerateDocs(c.Name(), args) {
|
||||
swaggergen.ParsePackagesFromDir(currentpath)
|
||||
}
|
||||
os.Exit(c.Run(c, args))
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user