This repository has been archived on 2024-05-03. You can view files and clone it, but cannot push or open issues or pull requests.
treefmt/internal/format/glob.go

16 lines
205 B
Go
Raw Normal View History

2023-12-23 12:50:47 +00:00
package format
import (
"github.com/gobwas/glob"
)
func PathMatches(path string, globs []glob.Glob) bool {
for idx := range globs {
if globs[idx].Match(path) {
return true
}
}
return false
}