path/filepath: add explicit comment marking elided errors

The errors on these lines are meant to be discarded.
Add a comment to make that extra clear.

Change-Id: I38f72af6dfbb0e86677087baf47780b3cc6e7d40
Reviewed-on: https://go-review.googlesource.com/c/go/+/241083
Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
Russ Cox 2020-07-06 11:28:15 -04:00
parent 6a167c7397
commit 6b344170db
1 changed files with 3 additions and 3 deletions

View File

@ -310,14 +310,14 @@ func glob(dir, pattern string, matches []string) (m []string, e error) {
m = matches
fi, err := os.Stat(dir)
if err != nil {
return
return // ignore I/O error
}
if !fi.IsDir() {
return
return // ignore I/O error
}
d, err := os.Open(dir)
if err != nil {
return
return // ignore I/O error
}
defer d.Close()