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>
This commit is contained in:
Alan Donovan 2026-01-09 11:01:00 -05:00 committed by Gopher Robot
parent 088ba94439
commit 55ab5bba17

View file

@ -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.