mirror of
https://github.com/pikami/rss-dl.git
synced 2025-12-22 18:40:12 +00:00
Remove HTTP GET params from saving file path
This commit is contained in:
@@ -3,6 +3,7 @@ package helpers
|
||||
import (
|
||||
"log"
|
||||
"regexp"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// ToCleanString - replaces spaces with underscores
|
||||
@@ -13,3 +14,8 @@ func ToCleanString(str string) string {
|
||||
}
|
||||
return reg.ReplaceAllString(str, "_")
|
||||
}
|
||||
|
||||
// RemoveGetParams - removes http GET params
|
||||
func RemoveGetParams(str string) string {
|
||||
return strings.Split(str, "?")[0]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user