MCPcopy Create free account
hub / github.com/WICG/webpackage / ParseParameterisedList

Function ParseParameterisedList

go/signedexchange/structuredheader/parser.go:91–103  ·  view source on GitHub ↗

ParseParameterisedList parses input as a Parameterised List. https://tools.ietf.org/html/draft-ietf-httpbis-header-structure-09#section-4.2

(input string)

Source from the content-addressed store, hash-verified

89// ParseParameterisedList parses input as a Parameterised List.
90// https://tools.ietf.org/html/draft-ietf-httpbis-header-structure-09#section-4.2
91func ParseParameterisedList(input string) (ParameterisedList, error) {
92 p := &parser{input}
93 p.discardLeadingOWS()
94 pl, err := p.parseParameterisedList()
95 if err != nil {
96 return nil, err
97 }
98 p.discardLeadingOWS()
99 if !p.isEmpty() {
100 return nil, errors.New("structuredheader: extraneous data at the end")
101 }
102 return pl, nil
103}
104
105// https://tools.ietf.org/html/draft-ietf-httpbis-header-structure-09#section-4.2.2
106func (p *parser) parseKey() (Key, error) {

Callers 3

VerifyMethod · 0.92
jsonPrintHeadersFunction · 0.92

Calls 3

discardLeadingOWSMethod · 0.95
isEmptyMethod · 0.95

Tested by 1