routing

package
v0.2.33 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package routing provides utilities for routing HTTP requests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Redirect

func Redirect(w http.ResponseWriter, r *http.Request, target string)

Redirect handles PRG and HTMX-compatible redirects.

func RedirectWithMessage

func RedirectWithMessage(w http.ResponseWriter, r *http.Request, target, key, value string)

RedirectWithMessage appends a query message and performs a redirect.

func WithPRG

func WithPRG(next http.Handler) http.Handler

WithPRG wraps handlers to automatically handle PRG pattern redirects. It intercepts POST requests and manages redirect responses.

Types

This section is empty.

Jump to

Keyboard shortcuts

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