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.
2 parents a60c6a1 + b30c9e8 commit 1c39d8aCopy full SHA for 1c39d8a
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