httpresp

package
v1.0.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Error

func Error(w http.ResponseWriter, r *http.Request, status int)

Error writes a localized error response for full-page and HTMX requests.

func Forbidden

func Forbidden(w http.ResponseWriter, r *http.Request)

func HomeActionLabel

func HomeActionLabel(ctx context.Context) string

HomeActionLabel returns localized primary action label for error pages.

func InternalServerError

func InternalServerError(w http.ResponseWriter, r *http.Request)

func NotFound

func NotFound(w http.ResponseWriter, r *http.Request)

func StatusTexts

func StatusTexts(ctx context.Context, status int) (string, string)

StatusTexts returns localized title/message for a standard HTTP status.

func TooManyRequests

func TooManyRequests(w http.ResponseWriter, r *http.Request)

Types

This section is empty.

Jump to

Keyboard shortcuts

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