tools/cmd/stringer
Daniel Martí bce7a99f8a cmd/stringer: add -trimprefix option
To trim a string prefix from the names when generating their final
strings. Add a simple test too.

There is no automatic detection of prefixes for now. That can be added
later, building on top of this first simple implementation.

Fixes #16539.

Change-Id: Ica37273ac74bb0a6cbd43e61823786963d86a492
Reviewed-on: https://go-review.googlesource.com/76650
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
2017-11-09 22:55:28 +00:00
..
testdata cmd/stringer: fix panic caused by integer overflow 2015-06-02 19:44:20 +00:00
endtoend_test.go cmd/stringer: fix typo in test log message ("no" -> "not") 2017-11-07 22:55:16 +00:00
golden_test.go cmd/stringer: add -trimprefix option 2017-11-09 22:55:28 +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: add -trimprefix option 2017-11-09 22:55:28 +00:00
util_test.go go.tools/cmd/stringer: add tests 2014-09-04 14:16:59 -07:00