aboutsummaryrefslogtreecommitdiff
path: root/src/path/filepath
diff options
context:
space:
mode:
authorAlan Donovan <adonovan@google.com>2026-01-09 11:01:00 -0500
committerGopher Robot <gobot@golang.org>2026-01-09 09:36:17 -0800
commit55ab5bba17a5221a51df244c8a3aeb1898cbdf1a (patch)
treeba79c4c6c9e3252987b455c4193f38d5b3d7eed9 /src/path/filepath
parent088ba94439775e025b90790f1c8db49ee2e7017f (diff)
downloadgo-55ab5bba17a5221a51df244c8a3aeb1898cbdf1a.tar.xz
path/filepath: Match: improve doc comment
Change-Id: Ic7a6e11ddeb79af67ece345405cdca6cf5199173 Reviewed-on: https://go-review.googlesource.com/c/go/+/735180 Reviewed-by: Damien Neil <dneil@google.com> Auto-Submit: Alan Donovan <adonovan@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/path/filepath')
-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.