From 4340ca271dc1279724af22ef53a92a040d845ba4 Mon Sep 17 00:00:00 2001 From: Baipyrus Date: Tue, 24 Sep 2024 14:49:47 +0200 Subject: [PATCH] ignore example files in configurations --- util/config.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/util/config.go b/util/config.go index 8d85822..a701582 100644 --- a/util/config.go +++ b/util/config.go @@ -4,6 +4,7 @@ import ( "encoding/json" "io/fs" "path/filepath" + "strings" "io" "os" @@ -13,7 +14,7 @@ func ReadConfigs(cfgPath string) ([]*Config, error) { var configs []*Config err := filepath.Walk(cfgPath, func(path string, info fs.FileInfo, err error) error { - if info.IsDir() { + if info.IsDir() || strings.HasSuffix(info.Name(), ".example.json") { return nil }