]> Cypherpunks repositories - gostls13.git/commit
path: remove filename mentions from pattern godocs
authorDaniel Martí <mvdan@mvdan.cc>
Tue, 16 Jan 2018 16:55:06 +0000 (16:55 +0000)
committerDaniel Martí <mvdan@mvdan.cc>
Wed, 14 Feb 2018 10:17:44 +0000 (10:17 +0000)
commit821b04dafbc5e94223766b15622d9b7b38b2f576
tree468bbb295a365e09af60d908be788a194756fbab
parent331092c58f35d798ed92b04cb57c503c8ef3ad31
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>
src/path/filepath/match.go
src/path/match.go