// DefaultIgnorePathFn checks whether a path is ignored. Currently defaults // to hidden files on *nix systems, ie they start with a ".". func DefaultIgnorePathFn(path string) bool { if strings.HasPrefix(path, ".") || strings.Contains(path, "/.") { return true } // ignore node if strings.HasPrefix(path, "node_modules") || strings.Contains(path, "/node_modules") { return true } // vim creates random numeric files base := filepath.Base(path) if str.IsNumeric(base) { return true } return false }
func isVimFile(path string) bool { base := filepath.Base(path) return str.IsNumeric(base) }