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

Function envValue

environment.go:520–536  ·  view source on GitHub ↗
(chain *chain, env map[string]interface{}, key string)

Source from the content-addressed store, hash-verified

518}
519
520func envValue(chain *chain, env map[string]interface{}, key string) (interface{}, bool) {
521 v, ok := env[key]
522
523 if !ok {
524 chain.fail(AssertionFailure{
525 Type: AssertContainsKey,
526 Actual: &AssertionValue{env},
527 Expected: &AssertionValue{key},
528 Errors: []error{
529 errors.New("expected: environment contains key"),
530 },
531 })
532 return nil, false
533 }
534
535 return v, true
536}

Callers 8

GetMethod · 0.85
GetBoolMethod · 0.85
GetIntMethod · 0.85
GetFloatMethod · 0.85
GetStringMethod · 0.85
GetBytesMethod · 0.85
GetDurationMethod · 0.85
GetTimeMethod · 0.85

Calls 1

failMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…