support generating docs outside $GOPATH

This commit is contained in:
fusionshen 2019-08-14 19:27:50 +08:00
parent 6a86284cec
commit 68b01db1dc
1 changed files with 2 additions and 3 deletions

View File

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