aboutsummaryrefslogtreecommitdiff
path: root/src/path/filepath/match.go
diff options
context:
space:
mode:
authorCarlos Amedee <carlos@golang.org>2026-01-21 15:45:40 -0500
committerCarlos Amedee <carlos@golang.org>2026-01-21 15:56:01 -0500
commiteec3c0ca956803db8a90dfd92ce4ebffebdaf9b4 (patch)
tree14ed37a5aa0fd9e80b547fd43086b2b137457726 /src/path/filepath/match.go
parent4606a931d2b099f2c5e5619b797352607ee42225 (diff)
parent2baa1d17628bb2f09757617382b1e61f1f9f0ddd (diff)
downloadgo-eec3c0ca956803db8a90dfd92ce4ebffebdaf9b4.tar.xz
[release-branch.go1.26] all: merge master (2baa1d1) into release-branch.go1.26
For #76474. Change-Id: Ic50e288f99b731b62af9aa73ce6721f0f2f3596d
Diffstat (limited to 'src/path/filepath/match.go')
-rw-r--r--src/path/filepath/match.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/path/filepath/match.go b/src/path/filepath/match.go
index 7ccf71ee0c..3c1c22bb8a 100644
--- a/src/path/filepath/match.go
+++ b/src/path/filepath/match.go
@@ -28,13 +28,15 @@ var ErrBadPattern = errors.New("syntax error in pattern")
// '[' [ '^' ] { character-range } ']'
// character class (must be non-empty)
// c matches character c (c != '*', '?', '\\', '[')
-// '\\' c matches character c
+// '\\' c matches character c (except on Windows)
//
// character-range:
// c matches character c (c != '\\', '-', ']')
-// '\\' c matches character c
+// '\\' c matches character c (except on Windows)
// lo '-' hi matches character c for lo <= c <= hi
//
+// Path segments in the pattern must be separated by [Separator].
+//
// Match requires pattern to match all of name, not just a substring.
// The only possible returned error is [ErrBadPattern], when pattern
// is malformed.