Skip to content

Added "OS" interface to improve testability

Compare
Choose a tag to compare
@bmatcuk bmatcuk released this 25 Apr 12:41
· 70 commits to master since this release

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.