cmd/stringer: use source importer when available
This means that running stringer should always
have the intended effect, without having to
go install the package first, which was a common
source of confusion.
The source importer is marginally slower,
but stringer is run infrequently,
and we're only typechecking one package (and fmt),
not an entire tree, as vet does.
Run-TryBot: Josh Bleecher Snyder <firstname.lastname@example.org>
TryBot-Result: Gobot Gobot <email@example.com>
Reviewed-by: Daniel Martí <firstname.lastname@example.org>
Reviewed-by: Robert Griesemer <email@example.com>
4 files changed