Releases: bmatcuk/doublestar
Added Support for SkipDir to GlobWalk
Your callback to GlobWalk can now return SkipDir which functions as it does in the standard library: if the current path is a directory, GlobWalk will not recurse into it. If the current path is not a directory, GlobWalk will stop processing the parent directory.
Added FilepathGlob Convenience Func; Better Support for Escaped Meta Chars
FilepathGlob is a convenience function for people who want a drop-in replacement for filepath.Glob()
.
Thanks sebastien-rosset
Fixed a bug with {alts} and */** backtracking
v4.0.3 v4.0.3
Fixed a bug with escaped characters
Fixed Windows Bugs
Fixed some Windows bugs in v4.0.0.
Complete Rewrite for Performance and io/fs Support
v4 is a complete rewrite with a focus on performance. Additionally, doublestar has been updated to use the new io/fs package for filesystem access. As a result, it is only supported by golang v1.16+. See README.md and UPGRADING.md for additional information.
Negate Character Classes with Exclamation Marks or Carets
To match POSIX patterns, v3 of doublestar supports negating character classes with exclamation marks (ie, [!...]
) in addition to carets ([^...]
). This is a minor breaking change if any of your existing patterns happen to include an exclamation mark as the first character in a character class. To fix the issue, simply escape the exclamation mark (ie, [\!...]
) or move it later in the character class (ie, `[...!...]').
Fixed Minor Recursion Bug
Fixed Minor Recursion Bug
Reduced Allocations
This release reduces some of the allocations in Match and PathMatch, improving performance. I've also added benchmarks in the tests.