]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: use stringer on types.EType
authorDaniel Martí <mvdan@mvdan.cc>
Sun, 12 Nov 2017 16:55:11 +0000 (16:55 +0000)
committerRobert Griesemer <gri@golang.org>
Mon, 13 Nov 2017 00:35:25 +0000 (00:35 +0000)
commit6e9960ea632cae58e6f8f494876f45fe05cc10b6
tree57346937143a7bedc3440359b4a7e862e963f304
parent79dbc1cc7b029e9f2e45cc9d7796151bd90b224a
cmd/compile: use stringer on types.EType

Another one that is possible thanks to the new -trimprefix stringer
flag.

The only subtle difference is that, in the previous version, some values
such as TUNSAFEPTR were stringified as "TUNSAFEPTR" instead of
"UNSAFEPTR". The new String method is always consistent in removing the
"T" prefix.

Passes toolstash -cmp on std cmd.

Change-Id: I68407f391795403dfcbbfa68c813018c0235bbb5
Reviewed-on: https://go-review.googlesource.com/77250
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Marvin Stenger <marvin.stenger94@gmail.com>
Reviewed-by: Robert Griesemer <gri@golang.org>
src/cmd/compile/internal/types/etype_string.go [new file with mode: 0644]
src/cmd/compile/internal/types/type.go
src/cmd/compile/internal/types/utils.go