]> Cypherpunks repositories - gostls13.git/commitdiff
forgot to update the body when i changed the receiver type.
authorRob Pike <r@golang.org>
Thu, 15 Oct 2009 07:27:26 +0000 (00:27 -0700)
committerRob Pike <r@golang.org>
Thu, 15 Oct 2009 07:27:26 +0000 (00:27 -0700)
R=rsc
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=35759
CL=35761

doc/effective_go.html

index 7fb605d394270e086d91e9d467f4dead34c0d2c8..21aa4cf82a3c9df73f01dff7e49886ad7b6b35d8 100644 (file)
@@ -1584,8 +1584,8 @@ But why make <code>Counter</code> a struct?  An integer is all that's needed.
 type Counter int
 
 func (ctr *Counter) ServeHTTP(c *http.Conn, req *http.Request) {
-       ctr++;
-       fmt.Fprintf(c, "counter = %d\n", ctr);
+       *ctr++;
+       fmt.Fprintf(c, "counter = %d\n", *ctr);
 }
 </pre>
 <p>