Releases: bmatcuk/doublestar
Close Directories Immediately
A small change to close directories immediately, rather than deferring. Thanks @luhring!
Close Directories Immediately
A small change to close directories immediately, rather than deferring. Thanks @luhring!
Fixed bug clobbering results if Readdir fails
If Readdir
failed, doublestar was returning nil
instead of the accumulated results. Thanks for the bug report @InfiniteTF!
Fixed bug clobbering results if Readdir fails
If Readdir
failed, doublestar was returning nil
instead of the accumulated results. Thanks for the bug report @InfiniteTF!
Further abstraction for OS interface
doublestar only needs Readdir
and the Closer
interface for the type returned by OS.Open()
. By changing the return type to this basic interface, it's even easier to abstract the calls to the filesystem for testing. This is an API change, though, necessitating a major version bump. Updating should be fairly easy. See: https://github.com/bmatcuk/doublestar/blob/master/UPGRADING.md
Thanks for the suggestion @c4milo!
Fixed bug matching files that started with a multi-byte unicode char
Thanks @bnkai for the bug report!
Added "OS" interface to improve testability
Thanks to @twpayne, doublestar now has exported versions of PathMatch and Glob (PathMatchOS
and GlobOS
respectively) that take an OS
interface which can be used to abstract the underlying filesystem calls. Using something like go-vfs, you can then write unit tests for code that uses doublestar without depending on an actual filesystem.
Existing PathMatch and Glob are unchanged.
Sort results from Glob()
v1.2.4 v1.2.4
Minor Bug Fix
Improves compatibility with path.Match by supporting something like Match("*/", "a/")