MCPcopy
hub / github.com/labstack/echo / TestContextGetOK

Function TestContextGetOK

context_generic_test.go:12–20  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

10)
11
12func TestContextGetOK(t *testing.T) {
13 c := NewContext(nil, nil)
14
15 c.Set("key", int64(123))
16
17 v, err := ContextGet[int64](c, "key")
18 assert.NoError(t, err)
19 assert.Equal(t, int64(123), v)
20}
21
22func TestContextGetNonExistentKey(t *testing.T) {
23 c := NewContext(nil, nil)

Callers

nothing calls this directly

Calls 2

SetMethod · 0.95
NewContextFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…