1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-06 16:06:56 +00:00
kyverno/pkg/utils/git/predicate.go

15 lines
201 B
Go
Raw Normal View History

package git
import (
"io/fs"
"path/filepath"
)
func IsYaml(file fs.FileInfo) bool {
if file.IsDir() {
return false
}
ext := filepath.Ext(file.Name())
return ext == ".yml" || ext == ".yaml"
}