mirror of
https://github.com/beego/bee.git
synced 2024-11-21 13:40:53 +00:00
Fix for projects with 'tests' in path
Projects with the string 'tests' in their path cannot document their models properly in swaggergen. The comment says the 'tests' subfolder within the dirpath should be excluded, but the test was for the full path. This should fix the discrepancy.
This commit is contained in:
parent
de82e68f73
commit
384d46897b
@ -119,7 +119,7 @@ func ParsePackagesFromDir(dirpath string) {
|
||||
// all 'tests' folders and dot folders wihin dirpath
|
||||
d, _ := filepath.Rel(dirpath, fpath)
|
||||
if !(d == "vendor" || strings.HasPrefix(d, "vendor"+string(os.PathSeparator))) &&
|
||||
!strings.Contains(fpath, "tests") &&
|
||||
!strings.Contains(d, "tests") &&
|
||||
!(d[0] == '.') {
|
||||
err = parsePackageFromDir(fpath)
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user