Upstream gocarina/gocsv state of the touched files before 7c8185d25e
This commit is contained in:
1 parent
9bc91ef163
commit
0ba11f2f3b
3 files changed
+2
-89
No files matched your search
@@ -130,8 +130,7 @@ func toInt(in interface{}) (int64, error) {
|
||||
return 0, nil
|
||||
}
|
||||
out := strings.SplitN(s, ".", 2)
|
||||
// base 10, not 0: a CSV field is data, not a Go literal
|
||||
return strconv.ParseInt(out[0], 10, 64)
|
||||
return strconv.ParseInt(out[0], 0, 64)
|
||||
case reflect.Bool:
|
||||
if inValue.Bool() {
|
||||
return 1, nil
|
||||
@@ -165,8 +164,7 @@ func toUint(in interface{}) (uint64, error) {
|
||||
}
|
||||
return uint64(f), nil
|
||||
}
|
||||
// base 10, see toInt
|
||||
return strconv.ParseUint(s, 10, 64)
|
||||
return strconv.ParseUint(s, 0, 64)
|
||||
case reflect.Bool:
|
||||
if inValue.Bool() {
|
||||
return 1, nil
|
||||
|
||||
Reference in new issue
Block a user