diff --git a/doc/effective_go.html b/doc/effective_go.html index 89c1d08782..38d09f4c73 100644 --- a/doc/effective_go.html +++ b/doc/effective_go.html @@ -1402,11 +1402,11 @@ the moment, the following snippet would also read the first 32 bytes of the buff var err error for i := 0; i < 32; i++ { nbytes, e := f.Read(buf[i:i+1]) // Read one byte. + n += nbytes if nbytes == 0 || e != nil { err = e break } - n += nbytes }