aboutsummaryrefslogtreecommitdiff
path: root/src/path
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2020-07-06 11:28:15 -0400
committerRuss Cox <rsc@golang.org>2020-07-07 03:43:31 +0000
commit6b344170db8fad38df941fe97db0348f6f1bb4d0 (patch)
treef31b161a35c19f8e6f63613f28981397acd649a1 /src/path
parent6a167c73977384f3646f4651901fe38347711b10 (diff)
downloadgo-6b344170db8fad38df941fe97db0348f6f1bb4d0.tar.gz
go-6b344170db8fad38df941fe97db0348f6f1bb4d0.zip
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>
Diffstat (limited to 'src/path')
-rw-r--r--src/path/filepath/match.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/path/filepath/match.go b/src/path/filepath/match.go
index 46badb5e84..20a334805b 100644
--- a/src/path/filepath/match.go
+++ b/src/path/filepath/match.go
@@ -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()