mirror of
https://github.com/golang/go.git
synced 2025-11-09 05:01:01 +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
|
|
@ -275,13 +275,13 @@ func (e *encodeState) reflectValueQuoted(v reflect.Value, quoted bool) {
|
|||
}
|
||||
|
||||
case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
|
||||
writeString(e, strconv.Itoa64(v.Int()))
|
||||
writeString(e, strconv.FormatInt(v.Int(), 10))
|
||||
|
||||
case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
|
||||
writeString(e, strconv.Uitoa64(v.Uint()))
|
||||
writeString(e, strconv.FormatUint(v.Uint(), 10))
|
||||
|
||||
case reflect.Float32, reflect.Float64:
|
||||
writeString(e, strconv.FtoaN(v.Float(), 'g', -1, v.Type().Bits()))
|
||||
writeString(e, strconv.FormatFloat(v.Float(), 'g', -1, v.Type().Bits()))
|
||||
|
||||
case reflect.String:
|
||||
if quoted {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue