~/talk

Go Templates

Talkat GopherCon 2022 · 2022-09-26..09-28· [go]
slides:none on file

Bitly replaces the confusing stdlib docs with a tiny wrapper package called templater wrapper that loads all .html files from a directory with filepath.Glob, builds a map[string]template.Template of templates, injects a global funcMap and a base HTML file, and exposes two calls: LoadTemplates at startup and ExecuteTemplate(w, "page.html", data) in handlers. The implementation uses html/template, is under 100 lines, and makes handlers one-line template renders.

AI-written summary · about

~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.