mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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
This commit is contained in:
parent
efbeaedb64
commit
2666b815a3
57 changed files with 150 additions and 153 deletions
|
|
@ -355,7 +355,7 @@ func (p *Package) guessKinds(f *File) []*Name {
|
|||
// with enum-derived constants. Otherwise
|
||||
// in the cgo -godefs output half the constants
|
||||
// are in hex and half are in whatever the #define used.
|
||||
i, err := strconv.Btoi64(n.Define, 0)
|
||||
i, err := strconv.ParseInt(n.Define, 0, 64)
|
||||
if err == nil {
|
||||
n.Const = fmt.Sprintf("%#x", i)
|
||||
} else {
|
||||
|
|
@ -1333,7 +1333,7 @@ func (c *typeConv) Opaque(n int64) ast.Expr {
|
|||
func (c *typeConv) intExpr(n int64) ast.Expr {
|
||||
return &ast.BasicLit{
|
||||
Kind: token.INT,
|
||||
Value: strconv.Itoa64(n),
|
||||
Value: strconv.FormatInt(n, 10),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue