Skip to content Search Apps Documentation Source Content Run Reset Eval Playground File Folder Download Copy Actions State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

util.gno

0.29 Kb · 18 lines
 1package blog
 2
 3import (
 4	"strings"
 5	"time"
 6)
 7
 8func breadcrumb(parts []string) string {
 9	return "# " + strings.Join(parts, " / ") + "\n\n"
10}
11
12func getTitleKey(title string) string {
13	return strings.ReplaceAll(title, " ", "")
14}
15
16func getPublishedKey(t time.Time) string {
17	return t.Format(time.RFC3339)
18}