(paths []string, fullPath bool)
| 23 | } |
| 24 | |
| 25 | func cleanPath(paths []string, fullPath bool) []string { |
| 26 | prefix := env.GetModulesDir() |
| 27 | var processedPaths []string |
| 28 | if !fullPath { |
| 29 | prefix, _ = filepath.Rel(env.GetCurrentDir(), prefix) |
| 30 | } |
| 31 | |
| 32 | for key := 0; key < len(paths); key++ { |
| 33 | if strings.HasPrefix(paths[key], prefix) { |
| 34 | continue |
| 35 | } |
| 36 | if !utils.Contains(processedPaths, paths[key]) { |
| 37 | processedPaths = append(processedPaths, paths[key]) |
| 38 | } |
| 39 | } |
| 40 | return processedPaths |
| 41 | } |
| 42 | |
| 43 | func GetNewPaths(paths []string, fullPath bool, rootPath string) []string { |
| 44 | paths = cleanPath(paths, fullPath) |
no test coverage detected