working sections version

This commit is contained in:
ston1th 2019-03-27 23:08:59 +01:00
commit 9424084a36
28 changed files with 367 additions and 251 deletions

View file

@ -48,7 +48,11 @@ func StoreTitle(section, title string) string {
}
func SplitStoreTitle(st string) (section, title string) {
if a := strings.Split(st, "/"); len(a) == 2 {
a := strings.Split(st, "/")
switch len(a) {
case 1:
return a[0], ""
case 2:
return a[0], a[1]
}
return