MCPcopy Index your code
hub / github.com/gavv/httpexpect / Delete

Method Delete

environment.go:78–86  ·  view source on GitHub ↗

Delete removes the value with key from the environment. Example: env := NewEnvironment(t) env.Put("key1", "str") env.Delete("key1")

(key string)

Source from the content-addressed store, hash-verified

76// env.Put("key1", "str")
77// env.Delete("key1")
78func (e *Environment) Delete(key string) {
79 opChain := e.chain.enter("Delete(%q)", key)
80 defer opChain.leave()
81
82 e.mu.Lock()
83 defer e.mu.Unlock()
84
85 delete(e.data, key)
86}
87
88// Clear will delete all key value pairs from the environment
89//

Callers 2

TestEnvironment_DeleteFunction · 0.80
TestEnvironment_ListFunction · 0.80

Calls 4

enterMethod · 0.80
leaveMethod · 0.80
LockMethod · 0.80
UnlockMethod · 0.80

Tested by 2

TestEnvironment_DeleteFunction · 0.64
TestEnvironment_ListFunction · 0.64