Explorar o código

only keep .yaml et .yml files

Thibault bui Koechlin %!s(int64=5) %!d(string=hai) anos
pai
achega
e09db79396
Modificáronse 1 ficheiros con 5 adicións e 1 borrados
  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 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
 	}