|
|
@ -9,9 +9,15 @@ import ( |
|
|
|
) |
|
|
|
|
|
|
|
func printpath(parts ...string) string { |
|
|
|
concat := strings.Join(parts, "") |
|
|
|
escaped := url.PathEscape(concat) |
|
|
|
return strings.ReplaceAll(escaped, "%2F", "/") |
|
|
|
var escapedParts []string |
|
|
|
for _, p := range parts { |
|
|
|
if len(p) == 1 { |
|
|
|
escapedParts = append(escapedParts, p) |
|
|
|
} else { |
|
|
|
escapedParts = append(escapedParts, url.PathEscape(p)) |
|
|
|
} |
|
|
|
} |
|
|
|
return strings.Join(escapedParts, "") |
|
|
|
} |
|
|
|
|
|
|
|
var funcMap = template.FuncMap{ |
|
|
|