1
0
mirror of https://github.com/beego/bee.git synced 2024-11-22 15:10:54 +00:00

support generating docs outside $GOPATH

This commit is contained in:
fusionshen 2019-08-14 19:27:50 +08:00
parent 6a86284cec
commit 68b01db1dc

View File

@ -67,11 +67,10 @@ func main() {
config.LoadConfig() config.LoadConfig()
// Check if current directory is inside the GOPATH, if cmd.IfGenerateDocs(c.Name(), args) {
// if so parse the packages inside it.
if utils.IsInGOPATH(currentpath) && cmd.IfGenerateDocs(c.Name(), args) {
swaggergen.ParsePackagesFromDir(currentpath) swaggergen.ParsePackagesFromDir(currentpath)
} }
os.Exit(c.Run(c, args)) os.Exit(c.Run(c, args))
return return
} }