mirror of
https://github.com/Binject/debug
synced 2026-06-08 10:28:33 +00:00
b147aba6f2
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>
17 lines
611 B
Go
17 lines
611 B
Go
// Code generated by "stringer -type=Class"; DO NOT EDIT.
|
|
|
|
package dwarf
|
|
|
|
import "strconv"
|
|
|
|
const _Class_name = "ClassUnknownClassAddressClassBlockClassConstantClassExprLocClassFlagClassLinePtrClassLocListPtrClassMacPtrClassRangeListPtrClassReferenceClassReferenceSigClassStringClassReferenceAltClassStringAlt"
|
|
|
|
var _Class_index = [...]uint8{0, 12, 24, 34, 47, 59, 68, 80, 95, 106, 123, 137, 154, 165, 182, 196}
|
|
|
|
func (i Class) String() string {
|
|
if i < 0 || i >= Class(len(_Class_index)-1) {
|
|
return "Class(" + strconv.FormatInt(int64(i), 10) + ")"
|
|
}
|
|
return _Class_name[_Class_index[i]:_Class_index[i+1]]
|
|
}
|