mostly finished db pages

This commit is contained in:
ston1th 2018-02-11 19:21:31 +01:00
commit 38f7c31517
10 changed files with 278 additions and 125 deletions

View file

@ -3,6 +3,7 @@ package main
import (
"fmt"
"strconv"
"strings"
"time"
)
@ -34,3 +35,13 @@ func since(t time.Time) string {
return fmt.Sprintf("%.fms", f)
}
}
func storeTitle(section, title string) string {
return section + "/" + title
}
func unstoreTitle(title string) (section, title string) {
if a := strings.Split(title, "/"); len(a) == 2 {
return a[0], a[1]
}
return
}