mark
mark copied to clipboard
Support double star (**) glob syntax
Hello,
it turns out that default golang Glob function does not support common globstar (**
) syntax. This syntax allows matching of files in subdirs too.
Here are some useful links:
- https://stackoverflow.com/questions/26809484/how-to-use-double-star-glob-in-go
- https://github.com/bmatcuk/doublestar
I've got this file structure:
root@903a83c00b08:/app/docs# tree
.
|-- docs
|-- foo.md
|-- bar.md
|-- baz
|-- qux.md
I ran with the file globbing pattern of -f "docs/**/*.md"
in the base folder and it only found qux.md
.
So it seems that this tool does support the **
syntax but that it won't find files in the docs
folder, but only subdirs of of docs
, but probably not subdirds of those subdirs 😄
I've created #392 to fix this. anyone still interested in it?