Skip to content

Patterns ​

Patterns are copyable userland conventions built from ordinary Go and gsx.

Available patterns ​

  • Package renderers — keep third-party value policy in an application-owned .gsx package.
  • Render once — emit a dialog container, inline style or script, or another singleton once per request.
  • Translation keys — write i18n keys in markup; a context-aware renderer translates them for the request's locale.
  • CSP nonce — send a per-request Content Security Policy and let gsx put its nonce on every script, style and link.
  • Streaming flush — flush the response mid-page so the browser paints above-the-fold markup before the slow tail.