headers

package
v5.16.3 Latest Latest
Warning

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

Go to latest
Published: May 5, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Middleware

func Middleware(headers map[string]string) func(http.Handler) http.Handler

Middleware creates and returns a MiddlewareFunc that will apply all of the headers that have been passed in. Headers are pre-converted to a slice for faster iteration and use Set() instead of Add() for single-value headers.

Types

type HeaderPair added in v5.15.2

type HeaderPair struct {
	Key   string
	Value string
}

HeaderPair represents a single header key-value pair for efficient iteration.

Jump to

Keyboard shortcuts

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