From 72c1885ee8e85f3e1e4ab985c1efc035cb649ca3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Toma=C5=BE=20Jerman?= Date: Fri, 20 Nov 2020 11:12:14 +0100 Subject: [PATCH] Small file ext tweak --- pkg/envoy/yaml/decoder.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/envoy/yaml/decoder.go b/pkg/envoy/yaml/decoder.go index 8eb0dc3b7..ad9d7aba1 100644 --- a/pkg/envoy/yaml/decoder.go +++ b/pkg/envoy/yaml/decoder.go @@ -6,6 +6,7 @@ import ( "io" "os" "path/filepath" + "strings" "github.com/cortezaproject/corteza-server/pkg/envoy/resource" "gopkg.in/yaml.v3" @@ -36,7 +37,7 @@ func Decoder(l loader) *decoder { // CanDecodeFile func (y *decoder) CanDecodeFile(i os.FileInfo) bool { - switch filepath.Ext(i.Name()) { + switch strings.Trim(filepath.Ext(i.Name()), ".") { case "yaml", "yml": return true }