doublestar
doublestar copied to clipboard
Implements support for double star (**) matches in golang's path.Match and filepath.Glob.
Fix issue #68 I've noticed `doublestar.FilepathGlob` has the following behavior: 1. Both `filepath.Glob(".")` and `doublestar.FilepathGlob("..")` return `[]string{"."}`. This is what I expected. 1. `filepath.Glob("..")` returns `[]string{".."}` but `doublestar.FilepathGlob("..")` returns `nil`....
`doublestar.FilepathGlob("..")` returns `nil`. Since it's meant to be a drop-in replacement for `filepath.Glob()`, it should return `[]string{".."}`
`doublestar.FilepathGlob` should return `filepath.ErrBadPattern`, not `path.ErrBadPattern`. That's because `doublestar.FilepathGlob` should be consistent with the `filepath.Glob` behavior. `doublestar.Glob` correctly returns `path.ErrBadPattern` for consistency with `io/fs.Glob`.
This is a fix for #66
Hello, Thank you for your work on this library. I have a use case where I'd exclude files and include others. I skimmed through the test-cases as well but I...
When I thought about developing a wheel, I found it, which would save me a lot of time, thanks! So will there be any official benchmark?
An alternative to #69 that maintains the existing behavior of following symlinks by default. Created as a draft PR to get feedback. If you're interested in this code I can...
- public wrapper for matchWithSeparator - rename doValidatePattern to public ValidateWithSeparator
I was writing a utility to detect test files for various javascript test frameworks. Was trying to use the glob pattern mentioned here https://playwright.dev/docs/api/class-testconfig#test-config-test-match, but it seems the pattern `**/*.@(spec|test).?(c|m)[jt]s?(x)`...