MCPcopy Index your code
hub / github.com/dunglas/httpsfv / UnmarshalDictionary

Function UnmarshalDictionary

dictionary.go:105–118  ·  view source on GitHub ↗

UnmarshalDictionary parses a dictionary as defined in https://httpwg.org/specs/rfc9651.html#parse-dictionary.

(v []string)

Source from the content-addressed store, hash-verified

103// UnmarshalDictionary parses a dictionary as defined in
104// https://httpwg.org/specs/rfc9651.html#parse-dictionary.
105func UnmarshalDictionary(v []string) (*Dictionary, error) {
106 s := &scanner{
107 data: strings.Join(v, ","),
108 }
109
110 s.scanWhileSp()
111
112 sfv, err := parseDictionary(s)
113 if err != nil {
114 return sfv, err
115 }
116
117 return sfv, nil
118}
119
120func parseDictionary(s *scanner) (*Dictionary, error) {
121 d := NewDictionary()

Callers 3

TestUnmarshalDictionaryFunction · 0.85

Calls 2

scanWhileSpMethod · 0.95
parseDictionaryFunction · 0.85

Tested by 3

TestUnmarshalDictionaryFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…