Build arm + arm64 binaries for linux and windows (#790)
* Build arm + arm64 binaries for linux and windows * Type MaxInt64 to avoid overflow on 32 bits arch On a 32 bits arch, math.MaxIn64 is interpreted as an int, and therefore overflows. This causes compilation to build on those platforms.
This commit is contained in:
+1
-1
@@ -312,7 +312,7 @@ func (enc *Encoder) encode(b []byte, ctx encoderCtx, v reflect.Value) ([]byte, e
|
||||
case reflect.Uint64, reflect.Uint32, reflect.Uint16, reflect.Uint8, reflect.Uint:
|
||||
x := v.Uint()
|
||||
if x > uint64(math.MaxInt64) {
|
||||
return nil, fmt.Errorf("toml: not encoding uint (%d) greater than max int64 (%d)", x, math.MaxInt64)
|
||||
return nil, fmt.Errorf("toml: not encoding uint (%d) greater than max int64 (%d)", x, int64(math.MaxInt64))
|
||||
}
|
||||
b = strconv.AppendUint(b, x, 10)
|
||||
case reflect.Int64, reflect.Int32, reflect.Int16, reflect.Int8, reflect.Int:
|
||||
|
||||
Reference in New Issue
Block a user