1
0
mirror of https://github.com/golang/go synced 2024-11-05 17:06:13 -07:00
go/cmd/stringer
Daniel Martí ae8cc59455 cmd/stringer: add flag to use line comment as str
This can be very helpful if you lay out each value's string
representation like this:

	and    // &
	andAnd // &&
	or     // |
	orOr   // ||

Without the use of comments, it's impossible to use stringer with these
names as the characters & and | cannot form valid identifiers in a Go
program.

Fixes #20483.

Change-Id: I4d36c74059dd48ae3a5e09b70a429a75853ef179
Reviewed-on: https://go-review.googlesource.com/44076
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
Reviewed-by: Rob Pike <r@golang.org>
2017-12-19 23:05:15 +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 flag to use line comment as str 2017-12-19 23:05:15 +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 flag to use line comment as str 2017-12-19 23:05:15 +00:00
util_test.go go.tools/cmd/stringer: add tests 2014-09-04 14:16:59 -07:00