1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2024-12-14 11:57:48 +00:00
kyverno/pkg/utils/git/predicate.go
Charles-Edouard Brétéché 6893842226
refactor: cli test command (#5550)
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2022-12-03 19:56:09 +01:00

14 lines
201 B
Go

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"
}