(basePath string, patterns []string)
| 255 | } |
| 256 | |
| 257 | func getDistinctPatternMatches(basePath string, patterns []string) ([]string, error) { |
| 258 | fileSys := os.DirFS(filepath.Clean(basePath)) |
| 259 | var filePaths []string |
| 260 | |
| 261 | for _, pattern := range patterns { |
| 262 | paths, err := doublestar.Glob(fileSys, filepath.ToSlash(pattern)) |
| 263 | if err != nil { |
| 264 | return nil, err |
| 265 | } |
| 266 | filePaths = append(filePaths, paths...) |
| 267 | } |
| 268 | |
| 269 | return util.SliceDistinct(filePaths), nil |
| 270 | } |
no test coverage detected