From e888b81a11df98d352580358e1ba524d05904d69 Mon Sep 17 00:00:00 2001 From: Vitor De Mario Date: Thu, 15 Sep 2016 20:46:20 -0300 Subject: [PATCH] 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 --- doc/effective_go.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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.