]> Cypherpunks repositories - gostls13.git/commitdiff
path/filepath: Match: improve doc comment
authorAlan Donovan <adonovan@google.com>
Fri, 9 Jan 2026 16:01:00 +0000 (11:01 -0500)
committerGopher Robot <gobot@golang.org>
Fri, 9 Jan 2026 17:36:17 +0000 (09:36 -0800)
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>

src/path/filepath/match.go

index 7ccf71ee0c3dd8881687979c3c6e105e6ba5031b..3c1c22bb8ac58a7d59debde8538f7ea951e0aab6 100644 (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.