strings: delete Runes, Bytes

gofmt -w -r 'strings.Bytes(a) -> []byte(a)' src/cmd src/pkg test/bench
gofmt -w -r 'strings.Runes(a) -> []int(a)' src/cmd src/pkg test/bench
delete unused imports

R=r
CC=golang-dev
https://golang.org/cl/224062
This commit is contained in:
Russ Cox 2010-02-25 16:01:29 -08:00
parent dfaa6eaa76
commit 9750adbbad
65 changed files with 239 additions and 310 deletions

View file

@ -724,7 +724,7 @@ func (c *typeConv) Opaque(n int64) ast.Expr {
func (c *typeConv) intExpr(n int64) ast.Expr {
return &ast.BasicLit{
Kind: token.INT,
Value: strings.Bytes(strconv.Itoa64(n)),
Value: []byte(strconv.Itoa64(n)),
}
}
@ -755,7 +755,7 @@ func (c *typeConv) Struct(dt *dwarf.StructType) (expr *ast.StructType, csyntax s
used[f.Name] = true
}
for cid, goid := range ident {
if token.Lookup(strings.Bytes(goid)).IsKeyword() {
if token.Lookup([]byte(goid)).IsKeyword() {
// Avoid keyword
goid = "_" + goid