You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As I try to build my code using a 32 bits architecture with goavro as a dependency I get the following error:
vendor/github.com/linkedin/goavro/array.go:48:34: constant -9223372036854775808 overflows int
vendor/github.com/linkedin/goavro/array.go:86:35: constant -9223372036854775808 overflows int
vendor/github.com/linkedin/goavro/binaryReader.go:96:27: constant -9223372036854775808 overflows int
vendor/github.com/linkedin/goavro/binaryReader.go:144:28: constant -9223372036854775808 overflows int
vendor/github.com/linkedin/goavro/map.go:50:34: constant -9223372036854775808 overflows int
vendor/github.com/linkedin/goavro/map.go:97:35: constant -9223372036854775808 overflows int
To build I used the following command:
GOOS=linux GOARCH=386 go build -a --ldflags="-s" -o bin/injector cmd/injector.go
As I looked at the code all lines that were producing errors are fmt.Errorf that prints the math.MinInt64.
To fix the problem is easy. In the array.go file just replace:
if blockCount == math.MinInt64 {
// The minimum number for any signed numerical type can never be made positive
return nil, nil, fmt.Errorf("cannot decode binary array with block count: %d", math.MinInt64)
}
with:
if blockCount == math.MinInt64 {
// The minimum number for any signed numerical type can never be made positive
return nil, nil, fmt.Errorf("cannot decode binary array with block count: %d", blockCount)
}
What happens is that for any reason math.MinInt64 is a constant and not a int64.
The text was updated successfully, but these errors were encountered:
As I try to build my code using a 32 bits architecture with goavro as a dependency I get the following error:
To build I used the following command:
As I looked at the code all lines that were producing errors are
fmt.Errorf
that prints themath.MinInt64
.To fix the problem is easy. In the array.go file just replace:
with:
What happens is that for any reason math.MinInt64 is a constant and not a int64.
The text was updated successfully, but these errors were encountered: