Browse Source

context: Fix WithValue example code.

LGTM=adg
R=adg
CC=golang-codereviews, sameer
https://golang.org/cl/169540043
David Symonds 11 years ago
parent
commit
53bb7518de
1 changed files with 1 additions and 1 deletions
  1. 1 1
      context/context.go

+ 1 - 1
context/context.go

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