Commit 821b04da authored by Daniel Martí's avatar Daniel Martí

path: remove filename mentions from pattern godocs

path.Match works purely with strings, not file paths. That's what sets
it apart from filepath.Match. For example, only filepath.Match will
change its behavior towards backslashes on Windows, to accomodate for
the file path separator on that system.

As such, path.Match should make no mention of file names. Nor should
path.ErrBadPattern mention globbing at all - the package has no notion
of globbing, and the error concerns only patterns.

For a similar reason, remove the mention of globbing from
filepath.ErrBadPattern. The error isn't reserved to just globbing, as it
can be returned from filepath.Match. And, as before, it only concerns
the patterns themselves.

Change-Id: I58a83ffa3e2549625d8e546ef916652525504bd1
Reviewed-on: https://go-review.googlesource.com/87857Reviewed-by: 's avatarRob Pike <r@golang.org>
parent 331092c5
......@@ -13,7 +13,7 @@ import (
"unicode/utf8"
)
// ErrBadPattern indicates a globbing pattern was malformed.
// ErrBadPattern indicates a pattern was malformed.
var ErrBadPattern = errors.New("syntax error in pattern")
// Match reports whether name matches the shell file name pattern.
......
......@@ -10,10 +10,10 @@ import (
"unicode/utf8"
)
// ErrBadPattern indicates a globbing pattern was malformed.
// ErrBadPattern indicates a pattern was malformed.
var ErrBadPattern = errors.New("syntax error in pattern")
// Match reports whether name matches the shell file name pattern.
// Match reports whether name matches the shell pattern.
// The pattern syntax is:
//
// pattern:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment