middleware

package
v0.0.0-...-f4f4368 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compress

func Compress(next http.Handler) http.Handler

Compress is a middleware that applies compression to HTTP responses.

func Logger

func Logger(log *slog.Logger, next http.Handler) http.Handler

Logger is a middleware that logs the start and end of each HTTP request along with some additional information.

func PanicRecovery

func PanicRecovery(next http.Handler) http.Handler

PanicRecovery is a middleware that recovers from panics in the application, preventing the server from crashing and logging the stack trace.

Types

This section is empty.

Jump to

Keyboard shortcuts

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