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

Method Add

dictionary.go:38–44  ·  view source on GitHub ↗

Add appends a new member to the ordered list.

(k string, v Member)

Source from the content-addressed store, hash-verified

36
37// Add appends a new member to the ordered list.
38func (d *Dictionary) Add(k string, v Member) {
39 if _, exists := d.values[k]; !exists {
40 d.names = append(d.names, k)
41 }
42
43 d.values[k] = v
44}
45
46// Del removes a member from the ordered list.
47func (d *Dictionary) Del(key string) bool {

Callers 5

TestMarshalDictionnaryFunction · 0.95
TestUnmarshalDictionaryFunction · 0.95
TestMarshalFunction · 0.95
parseDictionaryFunction · 0.95
valToDictionaryFunction · 0.95

Calls

no outgoing calls

Tested by 4

TestMarshalDictionnaryFunction · 0.76
TestUnmarshalDictionaryFunction · 0.76
TestMarshalFunction · 0.76
valToDictionaryFunction · 0.76