GET /fragment and GET /fragment/diagnostics return raw HTML, no page wrapperctrl.RenderTemplate() used directlyrenderAndCapture() mutex prevents buffer interleaving from simultaneous HTMX requests<div id="results"
hx-get="/fragment"
hx-trigger="every 1s"
hx-swap="innerHTML">
GET / → full page with HTMX polling on #results GET /fragment → HTML fragment (schematic only) GET /fragment/diagnostics → HTML fragment (diagnostics only) POST /start|/stop → toggle simulation, redirect /
The WASM demo below simulates this — JavaScript calls Go render functions directly.
Run task go-example:09 to see real HTMX partial updates.