Implement yaml format
This commit is contained in:
6
util.go
6
util.go
@@ -119,7 +119,7 @@ func GetSyncFilesRecursively(input string, output chan string, status chan error
|
||||
directories <- filepath.Join(directory, file.Name())
|
||||
} else {
|
||||
// log.Println(file.Name(), DirRegex.MatchString(file.Name()))
|
||||
if FileRegex.MatchString(file.Name()) {
|
||||
if FileRegex.MatchString(file.Name()) || IsYAMLSyncFile(file.Name()) {
|
||||
// log.Printf("Writing")
|
||||
output <- filepath.Join(directory, file.Name())
|
||||
}
|
||||
@@ -150,3 +150,7 @@ func GetSyncFilesRecursively(input string, output chan string, status chan error
|
||||
wg.Wait()
|
||||
log.Printf("Files processed: %d; Folders processed: %d", filesProcessed, foldersProcessed)
|
||||
}
|
||||
|
||||
func IsYAMLSyncFile(filename string) bool {
|
||||
return filename == "sync.yaml" || filename == "sync.yml"
|
||||
}
|
||||
|
Reference in New Issue
Block a user