Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ETags = func() map[string]string { m := map[string]string{} entries, err := assets.ReadDir(".") if err != nil { return m } for _, e := range entries { data, err := fs.ReadFile(assets, e.Name()) if err != nil { continue } sum := sha256.Sum256(data) m[e.Name()] = `"` + hex.EncodeToString(sum[:8]) + `"` } return m }()
ETags maps each embedded asset to a strong validator. Assets are served with Cache-Control: no-cache so an upgraded binary is never stale; the validator makes that policy cost a 304 instead of a refetch (the font alone is ~900KB, downloaded on every page load otherwise).
var FS = http.FS(assets)
Functions ¶
This section is empty.
Types ¶
This section is empty.