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
2023-12-23 12:50:51 +00:00

16 lines
205 B
Go

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
}