-
Daniel Martí authored
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>
c0b248c2