mirror of
https://github.com/beego/bee.git
synced 2025-07-01 17:20:17 +00:00
Fix generate swagger model api doc on Windows.
Add multiple gopath support for ParsePackagesFromDir. Improves gloomyzerg@39cc0bc04e109ff0f69e73d567354d9e82b7c24c fix for #332 that got lost on some merge.
This commit is contained in:
3
main.go
3
main.go
@ -17,7 +17,6 @@ import (
|
||||
"flag"
|
||||
"log"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/beego/bee/cmd"
|
||||
"github.com/beego/bee/cmd/commands"
|
||||
@ -64,7 +63,7 @@ func main() {
|
||||
|
||||
// Check if current directory is inside the GOPATH,
|
||||
// if so parse the packages inside it.
|
||||
if strings.Contains(currentpath, utils.GetGOPATHs()[0]+"/src") && cmd.IfGenerateDocs(c.Name(), args) {
|
||||
if utils.IsInGOPATH(currentpath) && cmd.IfGenerateDocs(c.Name(), args) {
|
||||
swaggergen.ParsePackagesFromDir(currentpath)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user