Repository navigation
v1.5.0
Highlights
A productivity release for server-rendered MPA / htmx sites — the output of a feature-DX review. Every addition is a thin, no-lock-in helper over the standard library; all changes are additive (no breaking changes, still Go 1.25).
htmx (#119)
ctx.IsHTMX(), HTMXRedirect, HTMXRefresh, and chainable HTMXReswap / HTMXRetarget / HTMXTrigger — detect htmx requests and drive swaps/redirects from Go.
Templates & components (#118)
dicttemplate func — pass multiple values to a component/partial:{{component "card" (dict "title" .T "body" .B)}}.jsontemplate func — inline<script>state, escaped for<script>safety.ctx.RenderComponentToString— render a component to a string for out-of-band composition.
Forms & navigation
ctx.FormState()(#121) — re-render a form with the submitted values and per-field validation errors.ctx.IsRoute(name)(#122) — most-specific active-nav highlighting; use from templates as{{.IsRoute "home"}}by passingctxas the view data.- Stateless flash messages
AddFlash/Flashes(#120) — post/redirect/get with no session store.
Security
- Opt-in signed cookies (#117) — a
CookieSignerinterface plus an HMAC-SHA256 reference impl (NewHMACCookieSigner), wired throughAddSignedCookie/SignedCookieValue. Binds the cookie name into the MAC, verifies in constant time.
What's Changed
- feat: add opt-in signed cookies (CookieSigner + HMAC-SHA256) by @acoshift in #117
- feat: add dict/json template funcs and RenderComponentToString by @acoshift in #118
- feat: add htmx Context helpers by @acoshift in #119
- feat: add stateless flash messages by @acoshift in #120
- feat: add FormState for re-rendering forms after validation by @acoshift in #121
- feat: add ctx.IsRoute for active-nav highlighting by @acoshift in #122
Full Changelog: v1.4.0...v1.5.0