refactoring of code

This commit is contained in:
Jonas Kaninda
2024-11-16 10:10:35 +01:00
parent 434c48d3ec
commit 858deb6b72
3 changed files with 15 additions and 9 deletions

View File

@@ -87,7 +87,7 @@ func MergeSlices(slice1, slice2 []string) []string {
return append(slice1, slice2...)
}
// ParseURLPath returns a URL path
// ParseURLPath removes duplicated [//]
func ParseURLPath(urlPath string) string {
// Replace any double slashes with a single slash
urlPath = strings.ReplaceAll(urlPath, "//", "/")