shared

package
v0.33.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2026 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PageRender

func PageRender(
	w http.ResponseWriter,
	opts PageOptions,
)

PageRender writes the provided HTML to the ResponseWriter using a standard status code and content type. If writing fails and a logger is provided, it logs the supplied error message together with the error.

Types

type PageOptions

type PageOptions struct {
	Title      string
	Layout     func(string) string
	Content    string
	Scripts    string
	Logger     *slog.Logger
	LogMessage string
}

Jump to

Keyboard shortcuts

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