package config import "strings" // splits an URL without empty sets func splitURL(url string) []string { trimmed := strings.Trim(url, " /\t\r\n") split := strings.Split(trimmed, "/") // remove empty set when empty url if len(split) == 1 && len(split[0]) == 0 { return []string{} } return split }