diff options
Diffstat (limited to 'skate/url.go')
-rw-r--r-- | skate/url.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/skate/url.go b/skate/url.go index 4ea406e..f619b24 100644 --- a/skate/url.go +++ b/skate/url.go @@ -28,7 +28,7 @@ var ( // really work, as syntactically valid URL strings may still be improbable // URLs, e.g. http://!!!x.com, etc. func SanitizeURL(s string) string { - if !hasAnyPrefix(s, okPrefixes) { + if !HasAnyPrefix(s, okPrefixes) { s = sanitizeRaw(s) if s == "" { return s @@ -82,8 +82,8 @@ func sanitizeRaw(s string) string { return "http://" + s } -// hasAnyPrefixes returns true, if any of the prefixes matches string s. -func hasAnyPrefix(s string, prefix []string) bool { +// HasAnyPrefixes returns true, if any of the prefixes matches string s. +func HasAnyPrefix(s string, prefix []string) bool { for _, p := range prefix { if strings.HasPrefix(s, p) { return true |