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

Method Del

params.go:54–70  ·  view source on GitHub ↗

Del removes a parameter from the ordered list.

(key string)

Source from the content-addressed store, hash-verified

52
53// Del removes a parameter from the ordered list.
54func (p *Params) Del(key string) bool {
55 if _, ok := p.values[key]; !ok {
56 return false
57 }
58
59 for i, k := range p.names {
60 if k == key {
61 p.names = append(p.names[:i], p.names[i+1:]...)
62
63 break
64 }
65 }
66
67 delete(p.values, key)
68
69 return true
70}
71
72// Names retrieves the list of parameter names in the appropriate order.
73func (p *Params) Names() []string {

Callers 1

TestMarshalParametersFunction · 0.95

Calls

no outgoing calls

Tested by 1

TestMarshalParametersFunction · 0.76