Commit Graph

4 Commits

Author SHA1 Message Date
greatroar d3695c2587 Fix Glob handling of backslashes
\m\a\t\c\h\.\g\o would be interpreted as a literal path, because the
backslash was missing in the check.
2021-03-15 18:11:02 +01:00
greatroar 413dd37571 Clean up matching/globbing code
getEsc, scanChunk and matchChunk were unused leftovers from the old
implementation, removed in 4f3e725e88.

isPathSeparator contained a useless cast to string.

The documentation (copied from path/filepath) referred to a Separator
constant, which is not present in the package.

Join, Split and Match are now explicitly marked as aliases for standard
library functions and refer to stdlib docs for details.
2021-03-15 18:10:43 +01:00
John Eikenberry 4f3e725e88 Fixes #188; eliminates duplicated core code
match contained lots of cut-n-pasted code from filepath/match.go in the
core libraries. Particularly Match() and Join() were changed in such a
way that made them functionally equivalent to the versions in
path/match.go. This removes the duplicate code and just calls the path
versions.
2017-07-20 15:28:11 -07:00
Catalin Tanasescu 43d52d4faa ported Glob method from filepath - https://golang.org/pkg/path/filepath/#Glob 2017-02-18 14:26:32 -08:00