From: Vitor De Mario Date: Thu, 15 Sep 2016 23:46:20 +0000 (-0300) Subject: doc: change variable name in Effective Go X-Git-Tag: go1.8beta1~1290 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=e888b81a11df98d352580358e1ba524d05904d69;p=gostls13.git doc: change variable name in Effective Go Effective Go has references to a function call f(c, req) made by ServeHTTP mixed with f(w, req). c is dropped in favor of w to maintain consistency Fixes #17128 Change-Id: I6746fd115ed5a58971fd24e54024d29d18ead1fa Reviewed-on: https://go-review.googlesource.com/29311 Reviewed-by: Rob Pike --- diff --git a/doc/effective_go.html b/doc/effective_go.html index f6fe48c8d0..e07c27ca2f 100644 --- a/doc/effective_go.html +++ b/doc/effective_go.html @@ -2409,7 +2409,7 @@ The http package contains this code: // Handler object that calls f. type HandlerFunc func(ResponseWriter, *Request) -// ServeHTTP calls f(c, req). +// ServeHTTP calls f(w, req). func (f HandlerFunc) ServeHTTP(w ResponseWriter, req *Request) { f(w, req) } @@ -2447,7 +2447,7 @@ the handler installed at that page has value ArgServer and type HandlerFunc. The HTTP server will invoke the method ServeHTTP of that type, with ArgServer as the receiver, which will in turn call -ArgServer (via the invocation f(c, req) +ArgServer (via the invocation f(w, req) inside HandlerFunc.ServeHTTP). The arguments will then be displayed.