From 68b01db1dc9d838ae673d853207823f4a0eeb21f Mon Sep 17 00:00:00 2001 From: fusionshen <365190287@qq.com> Date: Wed, 14 Aug 2019 19:27:50 +0800 Subject: [PATCH] support generating docs outside $GOPATH --- main.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index ef51e0d..7a33573 100644 --- a/main.go +++ b/main.go @@ -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 }