]> Cypherpunks repositories - gostls13.git/commitdiff
context: fix lint warning “drop = 0 from declaration”
authorMichael Stapelberg <stapelberg@google.com>
Wed, 30 Aug 2017 14:50:13 +0000 (07:50 -0700)
committerIan Lance Taylor <iant@golang.org>
Wed, 30 Aug 2017 17:06:30 +0000 (17:06 +0000)
Previously, the suggested code would result in the following golint warning:
“should drop = 0 from declaration of var errorsOnlyKey; it is the zero value”

Change-Id: I1a302c1e40ca89acbc76897e39097ecd04865460
Reviewed-on: https://go-review.googlesource.com/60290
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/context/context.go

index 892ff27c6539783da3c407e1e8daab75331192a9..0fbb572b8ebe5803877f544edb3c37ba6f2152b8 100644 (file)
@@ -136,7 +136,7 @@ type Context interface {
        //      // userKey is the key for user.User values in Contexts. It is
        //      // unexported; clients use user.NewContext and user.FromContext
        //      // instead of using this key directly.
-       //      var userKey key = 0
+       //      var userKey key
        //
        //      // NewContext returns a new Context that carries value u.
        //      func NewContext(ctx context.Context, u *User) context.Context {