diff options
| author | Daniel Martà <mvdan@mvdan.cc> | 2018-01-16 16:55:06 +0000 |
|---|---|---|
| committer | Daniel Martà <mvdan@mvdan.cc> | 2018-02-14 10:17:44 +0000 |
| commit | 821b04dafbc5e94223766b15622d9b7b38b2f576 (patch) | |
| tree | 468bbb295a365e09af60d908be788a194756fbab /src/path/filepath | |
| parent | 331092c58f35d798ed92b04cb57c503c8ef3ad31 (diff) | |
| download | go-821b04dafbc5e94223766b15622d9b7b38b2f576.tar.xz | |
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/87857
Reviewed-by: Rob Pike <r@golang.org>
Diffstat (limited to 'src/path/filepath')
| -rw-r--r-- | src/path/filepath/match.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/path/filepath/match.go b/src/path/filepath/match.go index 5168e037b5..057f7f3677 100644 --- a/src/path/filepath/match.go +++ b/src/path/filepath/match.go @@ -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. |
