Skip to content

Commit d4f0d68

Browse files
iwankgbmibk
authored andcommitted
Checking returned error
1 parent f01df18 commit d4f0d68

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

main.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ func crawlPaths(paths []string) chan string {
114114
fchan <- path
115115
continue
116116
}
117-
filepath.Walk(path, func(path string, info os.FileInfo, err error) error {
117+
err = filepath.Walk(path, func(path string, info os.FileInfo, err error) error {
118118
if !*vendor && (strings.HasPrefix(path, vendorDirPrefix) ||
119119
strings.Contains(path, vendorDirInPath)) {
120120
return nil
@@ -124,6 +124,9 @@ func crawlPaths(paths []string) chan string {
124124
}
125125
return nil
126126
})
127+
if err != nil {
128+
log.Fatal(err)
129+
}
127130
}
128131
close(fchan)
129132
}()

0 commit comments

Comments
 (0)