]> Cypherpunks repositories - gostls13.git/commit
all: add more uses of stringer
authorDaniel Martí <mvdan@mvdan.cc>
Mon, 13 Nov 2017 09:43:17 +0000 (09:43 +0000)
committerDaniel Martí <mvdan@mvdan.cc>
Mon, 19 Feb 2018 21:33:14 +0000 (21:33 +0000)
commit60cf9ec677cb87cce1480b2d442c64f051b7c007
tree8bc5756389a6563c9a6afa1e450ea16b5c1a0e8a
parent3cb54c86043a92ab080a89c06643d80015a5638e
all: add more uses of stringer

By grepping for ]string{$, one can find many manual implementations of
stringer. The debug/dwarf ones needed the new -trimprefix flag, too.

html/template was fairly simple, just implementing the fallback as
stringer would. The changes there are trivial.

The ones in debug/dwarf needed a bit of extra logic since the GoString
wants to use its own format, depending on whether or not the value is
one of the known constants.

Change-Id: I501ea7deaa538fa425c8e9c2bb895f480169273f
Reviewed-on: https://go-review.googlesource.com/77253
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/debug/dwarf/attr_string.go [new file with mode: 0644]
src/debug/dwarf/class_string.go
src/debug/dwarf/const.go
src/debug/dwarf/tag_string.go [new file with mode: 0644]
src/html/template/attr_string.go [new file with mode: 0644]
src/html/template/context.go