1
0
mirror of https://github.com/golang/go synced 2024-11-18 10:44:45 -07:00
go/cmd/stringer
Josh Bleecher Snyder 9bf174b4d3 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.

Fixes golang/go#10249

Change-Id: Ib8cde29bd6cc596964dbe7348065932dd59075fc
Reviewed-on: https://go-review.googlesource.com/40403
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Reviewed-by: Robert Griesemer <gri@golang.org>
2017-04-12 18:56:47 +00:00
..
testdata cmd/stringer: fix panic caused by integer overflow 2015-06-02 19:44:20 +00:00
endtoend_test.go cmd/stringer: use source importer when available 2017-04-12 18:56:47 +00:00
golden_test.go cmd/stringer: fix panic caused by integer overflow 2015-06-02 19:44:20 +00:00
importer18.go cmd/stringer: use source importer when available 2017-04-12 18:56:47 +00:00
importer19.go cmd/stringer: use source importer when available 2017-04-12 18:56:47 +00:00
stringer.go cmd/stringer: use source importer when available 2017-04-12 18:56:47 +00:00
util_test.go go.tools/cmd/stringer: add tests 2014-09-04 14:16:59 -07:00