context: Fix WithValue example code.

LGTM=adg
R=adg
CC=golang-codereviews, sameer
https://golang.org/cl/169540043
This commit is contained in:
David Symonds
2014-11-14 14:29:31 +11:00
parent 240cea5a06
commit 53bb7518de

View File

@@ -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.