lib/storage: properly pass uint64 constant to fmt.Errorf on 32-bit platforms

This commit is contained in:
Aliaksandr Valialkin 2022-10-23 12:48:00 +03:00
parent 2dd93449d8
commit 5d0a91afd5
No known key found for this signature in database
GPG Key ID: A72BEC6CD3D0DED1

View File

@ -475,7 +475,7 @@ func unmarshalMetricIDs(dst []uint64, src []byte) ([]uint64, error) {
}
n := encoding.UnmarshalUint64(src)
if n > ((1<<64)-1)/8 {
return dst, fmt.Errorf("unexpectedly high metricIDs len: %d bytes; must be lower than %d bytes", n, ((1<<64)-1)/8)
return dst, fmt.Errorf("unexpectedly high metricIDs len: %d bytes; must be lower than %d bytes", n, uint64(((1<<64)-1)/8))
}
src = src[8:]
if n*8 != uint64(len(src)) {