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
|
|
@ -889,9 +889,9 @@ Input:
|
|||
var n uint64
|
||||
var err error
|
||||
if i >= 3 && s[1] == 'x' {
|
||||
n, err = strconv.Btoui64(s[2:], 16)
|
||||
n, err = strconv.ParseUint(s[2:], 16, 64)
|
||||
} else {
|
||||
n, err = strconv.Btoui64(s[1:], 10)
|
||||
n, err = strconv.ParseUint(s[1:], 10, 64)
|
||||
}
|
||||
if err == nil && n <= unicode.MaxRune {
|
||||
text = string(n)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue