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 ¶
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 ¶
Types ¶
type ErrorProposalBadWeightFloat ¶
type ErrorProposalBadWeightFloat struct {
Err error
}
func (ErrorProposalBadWeightFloat) Error ¶
func (e ErrorProposalBadWeightFloat) Error() string
func (ErrorProposalBadWeightFloat) Unwrap ¶
func (e ErrorProposalBadWeightFloat) Unwrap() error
Click to show internal directories.
Click to hide internal directories.