aboutsummaryrefslogtreecommitdiffstats
path: root/skate/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'skate/cmd')
-rw-r--r--skate/cmd/skate-cleanup/main.go11
1 files changed, 1 insertions, 10 deletions
diff --git a/skate/cmd/skate-cleanup/main.go b/skate/cmd/skate-cleanup/main.go
index 72b258a..d4d5f5a 100644
--- a/skate/cmd/skate-cleanup/main.go
+++ b/skate/cmd/skate-cleanup/main.go
@@ -59,15 +59,6 @@ func main() {
}
}
-func hasAnyPrefix(s string, prefixes []string) bool {
- for _, p := range prefixes {
- if strings.HasPrefix(s, p) {
- return true
- }
- }
- return false
-}
-
// urlFilter parses finds the first URL.
func urlFilter(p []byte) ([]byte, error) {
parts := strings.Split(string(p), *delimiter)
@@ -87,7 +78,7 @@ func urlFilter(p []byte) ([]byte, error) {
if url == "" && *skipNonMatches {
return nil, nil
}
- if len(allowedSchemas) > 0 && !hasAnyPrefix(url, allowedSchemas) {
+ if len(allowedSchemas) > 0 && !skate.HasAnyPrefix(url, allowedSchemas) {
return nil, nil
}
if len(parts) == 1 || *index == len(parts) {