ref: b319c1896907332c542b6cebda596ed63aeca9af
parent: c54df37f6a506e035659d15e23372ebcccbefe39
author: srinivasreddy <thatiparthysreenivas@gmail.com>
date: Mon Mar 21 17:52:27 EDT 2016
source: Consolidate if conditions
--- a/source/filesystem.go
+++ b/source/filesystem.go
@@ -143,18 +143,11 @@
func isNonProcessablePath(filePath string) bool {base := filepath.Base(filePath)
- if base[0] == '.' {+ if strings.HasPrefix(base, ".") ||
+ strings.HasPrefix(base, "#") ||
+ strings.HasSuffix(base, "~") {return true
}
-
- if base[0] == '#' {- return true
- }
-
- if base[len(base)-1] == '~' {- return true
- }
-
ignoreFiles := viper.GetStringSlice("IgnoreFiles") if len(ignoreFiles) > 0 { for _, ignorePattern := range ignoreFiles {--
⑨