aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/debug
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2011-12-05 15:48:46 -0500
committerRuss Cox <rsc@golang.org>2011-12-05 15:48:46 -0500
commit2666b815a33edf3a9a1b7c335f9baabf27179d9f (patch)
tree830dce8d301c691ca77bf5649d1050203d982427 /src/pkg/debug
parentefbeaedb64e426f6874468ea4095d509622514df (diff)
downloadgo-2666b815a33edf3a9a1b7c335f9baabf27179d9f.tar.xz
use new strconv API
All but 3 cases (in gcimporter.go and hixie.go) are automatic conversions using gofix. No attempt is made to use the new Append functions even though there are definitely opportunities. R=golang-dev, gri CC=golang-dev https://golang.org/cl/5447069
Diffstat (limited to 'src/pkg/debug')
-rw-r--r--src/pkg/debug/dwarf/buf.go2
-rw-r--r--src/pkg/debug/dwarf/const.go4
-rw-r--r--src/pkg/debug/dwarf/type.go10
-rw-r--r--src/pkg/debug/elf/elf.go8
-rw-r--r--src/pkg/debug/macho/macho.go6
5 files changed, 15 insertions, 15 deletions
diff --git a/src/pkg/debug/dwarf/buf.go b/src/pkg/debug/dwarf/buf.go
index 6b4af7d53d..6dc28d2568 100644
--- a/src/pkg/debug/dwarf/buf.go
+++ b/src/pkg/debug/dwarf/buf.go
@@ -149,5 +149,5 @@ type DecodeError struct {
}
func (e DecodeError) Error() string {
- return "decoding dwarf section " + e.Name + " at offset 0x" + strconv.Itob64(int64(e.Offset), 16) + ": " + e.Err
+ return "decoding dwarf section " + e.Name + " at offset 0x" + strconv.FormatInt(int64(e.Offset), 16) + ": " + e.Err
}
diff --git a/src/pkg/debug/dwarf/const.go b/src/pkg/debug/dwarf/const.go
index 1a3fec155c..918b153d07 100644
--- a/src/pkg/debug/dwarf/const.go
+++ b/src/pkg/debug/dwarf/const.go
@@ -178,7 +178,7 @@ func (a Attr) GoString() string {
return "dwarf.Attr" + s
}
}
- return "dwarf.Attr(" + strconv.Itoa64(int64(a)) + ")"
+ return "dwarf.Attr(" + strconv.FormatInt(int64(a), 10) + ")"
}
// A format is a DWARF data encoding format.
@@ -347,7 +347,7 @@ func (t Tag) GoString() string {
return "dwarf.Tag" + s
}
}
- return "dwarf.Tag(" + strconv.Itoa64(int64(t)) + ")"
+ return "dwarf.Tag(" + strconv.FormatInt(int64(t), 10) + ")"
}
// Location expression operators.
diff --git a/src/pkg/debug/dwarf/type.go b/src/pkg/debug/dwarf/type.go
index e8ce8d57b8..9be66658fe 100644
--- a/src/pkg/debug/dwarf/type.go
+++ b/src/pkg/debug/dwarf/type.go
@@ -110,7 +110,7 @@ type ArrayType struct {
}
func (t *ArrayType) String() string {
- return "[" + strconv.Itoa64(t.Count) + "]" + t.Type.String()
+ return "[" + strconv.FormatInt(t.Count, 10) + "]" + t.Type.String()
}
func (t *ArrayType) Size() int64 { return t.Count * t.Type.Size() }
@@ -171,10 +171,10 @@ func (t *StructType) Defn() string {
s += "; "
}
s += f.Name + " " + f.Type.String()
- s += "@" + strconv.Itoa64(f.ByteOffset)
+ s += "@" + strconv.FormatInt(f.ByteOffset, 10)
if f.BitSize > 0 {
- s += " : " + strconv.Itoa64(f.BitSize)
- s += "@" + strconv.Itoa64(f.BitOffset)
+ s += " : " + strconv.FormatInt(f.BitSize, 10)
+ s += "@" + strconv.FormatInt(f.BitOffset, 10)
}
}
s += "}"
@@ -206,7 +206,7 @@ func (t *EnumType) String() string {
if i > 0 {
s += "; "
}
- s += v.Name + "=" + strconv.Itoa64(v.Val)
+ s += v.Name + "=" + strconv.FormatInt(v.Val, 10)
}
s += "}"
return s
diff --git a/src/pkg/debug/elf/elf.go b/src/pkg/debug/elf/elf.go
index c71b230bd9..03e42b0346 100644
--- a/src/pkg/debug/elf/elf.go
+++ b/src/pkg/debug/elf/elf.go
@@ -1490,11 +1490,11 @@ func stringName(i uint32, names []intName, goSyntax bool) string {
if goSyntax {
s = "elf." + s
}
- return s + "+" + strconv.Uitoa64(uint64(i-n.i))
+ return s + "+" + strconv.FormatUint(uint64(i-n.i), 10)
}
}
- return strconv.Uitoa64(uint64(i))
+ return strconv.FormatUint(uint64(i), 10)
}
func flagName(i uint32, names []intName, goSyntax bool) string {
@@ -1512,10 +1512,10 @@ func flagName(i uint32, names []intName, goSyntax bool) string {
}
}
if len(s) == 0 {
- return "0x" + strconv.Uitob64(uint64(i), 16)
+ return "0x" + strconv.FormatUint(uint64(i), 16)
}
if i != 0 {
- s += "+0x" + strconv.Uitob64(uint64(i), 16)
+ s += "+0x" + strconv.FormatUint(uint64(i), 16)
}
return s
}
diff --git a/src/pkg/debug/macho/macho.go b/src/pkg/debug/macho/macho.go
index 1386f5acf5..bc14226c56 100644
--- a/src/pkg/debug/macho/macho.go
+++ b/src/pkg/debug/macho/macho.go
@@ -278,7 +278,7 @@ func stringName(i uint32, names []intName, goSyntax bool) string {
return n.s
}
}
- return strconv.Uitoa64(uint64(i))
+ return strconv.FormatUint(uint64(i), 10)
}
func flagName(i uint32, names []intName, goSyntax bool) string {
@@ -296,10 +296,10 @@ func flagName(i uint32, names []intName, goSyntax bool) string {
}
}
if len(s) == 0 {
- return "0x" + strconv.Uitob64(uint64(i), 16)
+ return "0x" + strconv.FormatUint(uint64(i), 16)
}
if i != 0 {
- s += "+0x" + strconv.Uitob64(uint64(i), 16)
+ s += "+0x" + strconv.FormatUint(uint64(i), 16)
}
return s
}