17 lines
405 B
Go
17 lines
405 B
Go
package slowtwitch
|
|
|
|
import "strings"
|
|
|
|
func ConvertUrlToCategoryFormat(oldUrl string) string {
|
|
output := strings.ReplaceAll(oldUrl, " ", "_")
|
|
output = strings.ReplaceAll(output, "$", "_")
|
|
output = strings.ReplaceAll(output, "(", "_")
|
|
output = strings.ReplaceAll(output, ")", "_")
|
|
|
|
return "/" + output + "/index.html"
|
|
}
|
|
|
|
func GetURL(path string) string {
|
|
return "https://www.slowtwitch.com/" + path
|
|
}
|