Skip to content
Snippets Groups Projects
Commit 912bb25e authored by Billy Griffiths's avatar Billy Griffiths
Browse files

return the error if it happens

parent d8bd482e
No related branches found
No related tags found
1 merge request!24adds StripQueryString()
......@@ -296,11 +296,11 @@ func LimitStringToMaxLength(str string, maxLen int) string {
}
// StripQueryString - Strips the query parameters from a URL
func StripQueryString(inputUrl string) string {
func StripQueryString(inputUrl string) (string, error) {
u, err := url.Parse(inputUrl)
if err != nil {
panic(err)
return "", err
}
u.RawQuery = ""
return u.String()
return u.String(), nil
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment