Kiyor | | Created: 01-20-17 18:39:36, Last Update: 01-24-17 10:48:12
# set value
child_ctx = context.WithValue(parent_ctx, key, value)
# get value
Kiyor | | Created: 08-23-16 08:46:59, Last Update: 08-23-16 11:07:26
most of code copy from official go/src/net/http/transport_test.go
package main
Kiyor | | Created: 08-25-15 07:24:48, Last Update: 08-28-15 11:18:50
golang 1.5 在常用的net/http
包里新增了Request.Cancel, 导致原来可以直接把request给json化的方式出现了json: unsupported type: <-chan struct {}
. 在debug的时候看不到请求了.
解决方式也十分坑…
type Req struct {