Skip to content

Commit

Permalink
Address comments
Browse files Browse the repository at this point in the history
- Thanks to Markus for suggestion about simplify the logic to get
excluded file paths
  • Loading branch information
shashwathi committed Oct 28, 2019
1 parent ddfe245 commit 177228a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/test_images/runtime/handlers/runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,16 @@ func excludeFilePaths(filePaths []string, excludedPaths []string) []string {
var paths []string
for _, path := range filePaths {
excluded := false
for i := len(excludedPaths) - 1; i >= 0 && !excluded; i-- {
excluded = path == excludedPaths[i]
for _, excludedPath := range excludedPaths {
if path == excludedPath {
excluded = true
break
}
}

if !excluded {
paths = append(paths, path)
}
}

return paths
}

0 comments on commit 177228a

Please sign in to comment.