content

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2026 License: CC0-1.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrorProposalEmpty = errors.New("empty media-type")
View Source
var ErrorProposalEmptySub = errors.New("empty media subtype, i.e. <supertype>/<subtype>")
View Source
var ErrorProposalEmptySuper = errors.New("empty media supertype, i.e. <supertype>/<subtype>")
View Source
var ErrorProposalWildSuper = errors.New("supertype may not be wild on it's own, i.e. */<subtype>")

Functions

func ParseAccept

func ParseAccept(accept string) iter.Seq[string]

Returns mediatypes in the order specified by https://httpwg.org/specs/rfc9110.html#field.accept starting with highest precedence.

An empty string will yield a single "*/*".

Invalid proposals are dropped.

func ParseProposal

func ParseProposal(s string) (proposal, error)

Types

type ErrorProposalBadWeightFloat

type ErrorProposalBadWeightFloat struct {
	Err error
}

func (ErrorProposalBadWeightFloat) Error

func (ErrorProposalBadWeightFloat) Unwrap

Jump to

Keyboard shortcuts

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