commit | c0b248c234e0a5e26d7dff77adf9a9f2a92a7a9c | [log] [tgz] |
---|---|---|
author | Daniel Martí <mvdan@mvdan.cc> | Wed Jan 31 20:53:44 2018 +0000 |
committer | Daniel Martí <mvdan@mvdan.cc> | Tue Feb 13 21:19:57 2018 +0000 |
tree | cc4186f2c237217becd0c8d8f00d809e1182e4f0 | |
parent | 7ddd467ef335f9ea2347bb9c2628091568b3370f [diff] |
cmd/vet: replace hasMethod with isFormatter The former checks if a type has a method called "Format". The latter checks if a type satisfies fmt.Formatter. isFormatter does exactly what we want, so it's both simpler and more accurate. Remove the only use of hasMethod in its favor. Change-Id: Idc156a99081c3308f98512b87011a04aa8c6638d Reviewed-on: https://go-review.googlesource.com/91215 Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org> Reviewed-by: Rob Pike <r@golang.org>
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
Gopher image by Renee French, licensed under Creative Commons 3.0 Attributions license.
Our canonical Git repository is located at https://go.googlesource.com/go. There is a mirror of the repository at https://github.com/golang/go.
Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.
Official binary distributions are available at https://golang.org/dl/.
After downloading a binary release, visit https://golang.org/doc/install or load doc/install.html in your web browser for installation instructions.
If a binary distribution is not available for your combination of operating system and architecture, visit https://golang.org/doc/install/source or load doc/install-source.html in your web browser for source installation instructions.
Go is the work of hundreds of contributors. We appreciate your help!
To contribute, please read the contribution guidelines: https://golang.org/doc/contribute.html
Note that the Go project uses the issue tracker for bug reports and proposals only. See https://golang.org/wiki/Questions for a list of places to ask questions about the Go language.