Updated getEscapedName with slash to dash instead of space

Remove only the first slash, convert the rest to dash
This commit is contained in:
Patrick O'Connor 2016-02-02 18:02:28 -08:00
parent cb46e8751b
commit 31e0340959

View file

@ -63,6 +63,7 @@ func replace(s1 string, s2 string, s3 string) string {
return strings.Replace(s3, s1, s2, -1)
}
// Escape beginning slash "/", convert all others to dash "-"
func getEscapedName(name string) string {
return strings.Replace(name, "/", "", -1)
return strings.Replace(strings.TrimPrefix(name, "/"), "/", "-", -1)
}