1
0
mirror of https://github.com/rclone/rclone.git synced 2025-12-17 16:53:22 +00:00

vendor: update dependencies to latest

This commit is contained in:
Nick Craig-Wood
2018-11-24 15:31:25 +00:00
parent 58f7141c96
commit 89625e54cf
173 changed files with 4954 additions and 2224 deletions

View File

@@ -166,9 +166,6 @@ func newValue(t ValueType, base int, raw []rune) (Value, error) {
switch t {
case DecimalType:
v.decimal, err = strconv.ParseFloat(string(raw), 64)
if err != nil {
panic(err)
}
case IntegerType:
if base != 10 {
raw = raw[2:]
@@ -183,6 +180,16 @@ func newValue(t ValueType, base int, raw []rune) (Value, error) {
v.boolean = runeCompare(v.raw, runesTrue)
}
// issue 2253
//
// if the value trying to be parsed is too large, then we will use
// the 'StringType' and raw value instead.
if nerr, ok := err.(*strconv.NumError); ok && nerr.Err == strconv.ErrRange {
v.Type = StringType
v.str = string(raw)
err = nil
}
return v, err
}