From: Alan Donovan Date: Fri, 9 Jan 2026 16:01:00 +0000 (-0500) Subject: path/filepath: Match: improve doc comment X-Git-Tag: go1.26rc3~11^2~24 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=55ab5bba17a5221a51df244c8a3aeb1898cbdf1a;p=gostls13.git path/filepath: Match: improve doc comment Change-Id: Ic7a6e11ddeb79af67ece345405cdca6cf5199173 Reviewed-on: https://go-review.googlesource.com/c/go/+/735180 Reviewed-by: Damien Neil Auto-Submit: Alan Donovan LUCI-TryBot-Result: Go LUCI --- 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.