• Rob Pike's avatar
    doc: tweak example in Effective Go · 7c2718b1
    Rob Pike authored
    A prior attempt at addressing the issue got bogged down in an
    endless conversation around the subtleties of Read semantics.
    Let's not go there.
    
    Instead, we put the issue to bed, perhaps not in perfect comfort
    but well enough, by moving a line of the example so that even
    if there is a "benign" error as the issue suggests, the loop
    terminates with n and err correctly set.
    
    Fixes #27818
    
    Change-Id: I4a32d56c9e782f17578565d90b22ce531e3d8667
    Reviewed-on: https://go-review.googlesource.com/c/143677Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
    7c2718b1
Name
Last commit
Last update
.github Loading commit data...
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...