We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a60c6a1 commit b30c9e8Copy full SHA for b30c9e8
main.go
@@ -48,11 +48,11 @@ func init() {
48
}
49
50
func walkDir(names []string, dir string) ([]string, error) {
51
- e := filepath.Walk(dir, func(path string, _ os.FileInfo, err error) error {
+ e := filepath.Walk(dir, func(path string, finfo os.FileInfo, err error) error {
52
if err != nil {
53
return err
54
55
- if strings.HasSuffix(path, ".go") {
+ if strings.HasSuffix(path, ".go") && !finfo.IsDir() {
56
names = append(names, path)
57
58
return nil
0 commit comments