mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-06 16:06:56 +00:00
15 lines
201 B
Go
15 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"
|
||
|
}
|