Documentation
¶
Overview ¶
Package htmlbind provides runtime configuration and response helpers for code generated from htmlbind templates.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ZstdCompression bool
ZstdCompression controls whether generated HTML responses may use Zstandard content encoding. It is disabled by default. Set it during application startup, before serving requests; do not mutate it concurrently with requests.
Functions ¶
func PrepareResponse ¶
func PrepareResponse(w http.ResponseWriter, r *http.Request) (http.ResponseWriter, func() error, error)
PrepareResponse wraps w in a Zstandard encoder when compression is enabled and the request accepts zstd. The returned close function must always be called, including when rendering fails.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.