cmd/vet: remove Peek from methods check #19719
Closed
Labels
Milestone
Comments
Fine with me. |
CL https://golang.org/cl/38722 mentions this issue. |
lparth
added a commit
to lparth/go
that referenced
this issue
Apr 13, 2017
It is insufficiently canonical; see the discussion at issue 19719. Fixes golang#19719 Change-Id: I0559ff3b1b39d7bc4b446d104f36fdf8ce3da50e Reviewed-on: https://go-review.googlesource.com/38722 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rob Pike <r@golang.org>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
vet's methods check ensures that methods with a canonical name have the right signature. This includes:
But it's not clear to me why the unexported
image.reader
interface is important enough to set the canonical interpretation of Peek.I see three Peeks in the standard library:
Of these, only
bufio.Reader
matches. AnotherPeek
that comes to mind is from Russ's article Off to the Races:I think we should remove
Peek
from the list of canonical method names.The CL is trivial; this issue is to ask for approval.
@robpike
The text was updated successfully, but these errors were encountered: