work in progress

This commit is contained in:
ston1th 2018-09-04 23:15:47 +02:00
commit 07ff5ccffb
23 changed files with 228 additions and 240 deletions

View file

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