(path string)
| 24 | ) |
| 25 | |
| 26 | func FilePathToParts(path string) []string { |
| 27 | components := []string{} |
| 28 | |
| 29 | if path == "" { |
| 30 | return components |
| 31 | } |
| 32 | |
| 33 | for segment := range strings.SplitSeq(filepath.Clean(path), string(filepath.Separator)) { |
| 34 | if segment != "" { |
| 35 | components = append(components, segment) |
| 36 | } |
| 37 | } |
| 38 | |
| 39 | return components |
| 40 | } |
| 41 | |
| 42 | func readIgnoreFile(fileSystem afero.Fs, path, ignore string) ([]gitignore.Pattern, error) { |
| 43 | var ps []gitignore.Pattern |
no outgoing calls