From e09db79396d0412d8217387c69a309a11a22c3a2 Mon Sep 17 00:00:00 2001 From: Thibault bui Koechlin Date: Thu, 11 Jun 2020 17:57:53 +0200 Subject: [PATCH] only keep .yaml et .yml files --- pkg/cwhub/hubMgmt.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/cwhub/hubMgmt.go b/pkg/cwhub/hubMgmt.go index b02f0ac11..e154dbde0 100644 --- a/pkg/cwhub/hubMgmt.go +++ b/pkg/cwhub/hubMgmt.go @@ -113,7 +113,11 @@ func parser_visit(path string, f os.FileInfo, err error) error { var fauthor string var stage string //we only care about files - if f == nil || f.IsDir() || strings.HasSuffix(f.Name(), "~") { + if f == nil || f.IsDir() { + return nil + } + //we only care about yaml files + if !strings.HasSuffix(f.Name(), ".yaml") && !strings.HasSuffix(f.Name(), ".yml") { return nil }