Post-Migrator/services/slowtwitch/url-converter.go

17 lines
405 B
Go
Raw Normal View History

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
}