htmlbind

package
v0.1.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 22, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL