Skip to content

Commit

Permalink
[wiring] allow both yaml and yml file ext
Browse files Browse the repository at this point in the history
  • Loading branch information
Frostman committed Jul 26, 2024
1 parent 64e38e1 commit ec8c27c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/wiring/loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"log"
"os"
"path/filepath"
"slices"
"strings"

"github.com/pkg/errors"
Expand Down Expand Up @@ -90,7 +91,7 @@ func LoadDir(f fs.FS, root string, data *Data) error {
return nil
}

if filepath.Ext(path) != ".yaml" || strings.Contains(path, "kustom") || strings.Contains(path, ".skip.") {
if !slices.Contains([]string{".yaml", ".yml"}, filepath.Ext(path)) || strings.Contains(path, "kustom") || strings.Contains(path, ".skip.") {
// log.Println("Skipping file", path)

return nil
Expand Down

0 comments on commit ec8c27c

Please sign in to comment.