mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd: re-generate all stringer files
The tool has gotten better over time, so re-generating the files brings some advantages like fewer objects, dropping the use of fmt, and dropping unnecessary bounds checks. While at it, add the missing go:generate line for obj.AddrType. Change-Id: I120c9795ee8faddf5961ff0384b9dcaf58d831ff Reviewed-on: https://go-review.googlesource.com/100015 Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
8f406af8e8
commit
c15b7b2a54
9 changed files with 22 additions and 32 deletions
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
package gc
|
||||
|
||||
import "fmt"
|
||||
import "strconv"
|
||||
|
||||
const _Class_name = "PxxxPEXTERNPAUTOPAUTOHEAPPPARAMPPARAMOUTPFUNCPDISCARD"
|
||||
|
||||
|
|
@ -10,7 +10,7 @@ var _Class_index = [...]uint8{0, 4, 11, 16, 25, 31, 40, 45, 53}
|
|||
|
||||
func (i Class) String() string {
|
||||
if i >= Class(len(_Class_index)-1) {
|
||||
return fmt.Sprintf("Class(%d)", i)
|
||||
return "Class(" + strconv.FormatInt(int64(i), 10) + ")"
|
||||
}
|
||||
return _Class_name[_Class_index[i]:_Class_index[i+1]]
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue