From da0caa1d34ff428164630a89161b66a78d60a99a Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Thu, 20 Jul 2023 21:00:58 -0700 Subject: [PATCH] app/vlinsert/loki: fix build for architectures where int is 32-bit --- app/vlinsert/loki/loki_json.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/vlinsert/loki/loki_json.go b/app/vlinsert/loki/loki_json.go index 5ace832b0c..381aa34364 100644 --- a/app/vlinsert/loki/loki_json.go +++ b/app/vlinsert/loki/loki_json.go @@ -176,10 +176,10 @@ func parseLokiTimestamp(s string) (int64, error) { return 0, err } if f > math.MaxInt64 { - return 0, fmt.Errorf("too big timestamp in nanoseconds: %v; mustn't exceed %v", f, math.MaxInt64) + return 0, fmt.Errorf("too big timestamp in nanoseconds: %v; mustn't exceed %v", f, int64(math.MaxInt64)) } if f < math.MinInt64 { - return 0, fmt.Errorf("too small timestamp in nanoseconds: %v; must be bigger or equal to %v", f, math.MinInt64) + return 0, fmt.Errorf("too small timestamp in nanoseconds: %v; must be bigger or equal to %v", f, int64(math.MinInt64)) } n = int64(f) }