slash method improved
This commit is contained in:
parent
b26146a05e
commit
1f0be18f23
|
@ -193,7 +193,9 @@ func slash(str string) string {
|
||||||
str = "/" + str
|
str = "/" + str
|
||||||
}
|
}
|
||||||
if string(str[len(str)-1]) == "/" {
|
if string(str[len(str)-1]) == "/" {
|
||||||
if string(str) == "/" {
|
if len(str) == 0 {
|
||||||
|
return str
|
||||||
|
} else if string(str) == "/" {
|
||||||
str = ""
|
str = ""
|
||||||
} else {
|
} else {
|
||||||
str = str[0 : len(str)-2]
|
str = str[0 : len(str)-2]
|
||||||
|
|
Loading…
Reference in New Issue