예제 #1
0
파일: context_test.go 프로젝트: AlekSi/echo
func TestStdContextEmbedded(t *testing.T) {
	c := new(context)
	sc := gcontext.WithValue(nil, "key", "val")
	c.SetStdContext(sc)
	assert.NotEqual(t, c, c.StdContext())
}
예제 #2
0
파일: context.go 프로젝트: flike/kingshard
func (c *echoContext) Set(key string, val interface{}) {
	c.context = context.WithValue(c.context, key, val)
}