gobwas / glob

Go glob
MIT License
948 stars 63 forks source link

Usage examples on Directories/Files? #22

Closed IkiM0no closed 6 years ago

IkiM0no commented 6 years ago

Hi, thanks for this promising looking package. I see all the great stuff in the README for matching strings, but could you please provide a short example for doing actual directory/file pattern matching using his library?

gobwas commented 6 years ago

Hi! Thanks for the feedback. This package is intended to match strings with glob syntax – which is simpler and can be faster than regular expressions. For directory/file pattern matching you could use one from standard library – filepath package. Or, by any reason, you could apply this package to every entry name in a filesystem manually.