Skip to content

Commit

Permalink
feat: ignore testdata and vendor directories
Browse files Browse the repository at this point in the history
  • Loading branch information
ldez committed Jun 20, 2022
1 parent 001af82 commit 6551ec4
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion mocktail.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,15 @@ func walk(modulePath, moduleName string) (map[string]PackageDesc, error) {
return err
}

if d.IsDir() || d.Name() != srcMockFile {
if d.IsDir() {
if d.Name() == "testdata" || d.Name() == "vendor" {
return filepath.SkipDir
}

return nil
}

if d.Name() != srcMockFile {
return nil
}

Expand Down

0 comments on commit 6551ec4

Please sign in to comment.