Browse Source

only keep .yaml et .yml files

Thibault bui Koechlin 5 years ago
parent
commit
e09db79396
1 changed files with 5 additions and 1 deletions
  1. 5 1
      pkg/cwhub/hubMgmt.go

+ 5 - 1
pkg/cwhub/hubMgmt.go

@@ -113,7 +113,11 @@ func parser_visit(path string, f os.FileInfo, err error) error {
 	var fauthor string
 	var fauthor string
 	var stage string
 	var stage string
 	//we only care about files
 	//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
 		return nil
 	}
 	}