Merge pull request #535 from stanxii/master
upgrade go 1.7 ctxhttp to req.WithContext
Peter Bourgon authored 6 years ago
GitHub committed 6 years ago
7 | 7 | "io/ioutil" |
8 | 8 | "net/http" |
9 | 9 | "net/url" |
10 | ||
11 | "golang.org/x/net/context/ctxhttp" | |
12 | 10 | |
13 | 11 | "github.com/go-kit/kit/endpoint" |
14 | 12 | ) |
117 | 115 | ctx = f(ctx, req) |
118 | 116 | } |
119 | 117 | |
120 | resp, err = ctxhttp.Do(ctx, c.client, req) | |
118 | resp, err = c.client.Do(req.WithContext(ctx)) | |
119 | ||
121 | 120 | if err != nil { |
122 | 121 | return nil, err |
123 | 122 | } |