mirror of
https://github.com/golang/net.git
synced 2026-03-31 18:37:08 +09:00
context: Fix WithValue example code.
LGTM=adg R=adg CC=golang-codereviews, sameer https://golang.org/cl/169540043
This commit is contained in:
@@ -124,7 +124,7 @@ type Context interface {
|
||||
//
|
||||
// // NewContext returns a new Context that carries value u.
|
||||
// func NewContext(ctx context.Context, u *User) context.Context {
|
||||
// return context.WithValue(userKey, u)
|
||||
// return context.WithValue(ctx, userKey, u)
|
||||
// }
|
||||
//
|
||||
// // FromContext returns the User value stored in ctx, if any.
|
||||
|
||||
Reference in New Issue
Block a user