From 7b14a009207b6bd74f143cb23e3cef2f3e5a6725 Mon Sep 17 00:00:00 2001 From: "Kirill A. Korinsky" Date: Thu, 15 Dec 2016 17:39:24 +0400 Subject: [PATCH] Add support to big.int timestamp --- input/pickle.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/input/pickle.go b/input/pickle.go index 3b859901..78845d39 100644 --- a/input/pickle.go +++ b/input/pickle.go @@ -6,6 +6,7 @@ import ( "encoding/binary" "fmt" "io" + "math/big" "net" "github.com/graphite-ng/carbon-relay-ng/badmetrics" @@ -139,7 +140,7 @@ ReadLoop: switch data[0].(type) { case string: timestamp = data[0].(string) - case uint8, uint16, uint32, uint64, int8, int16, int32, int64: + case uint8, uint16, uint32, uint64, int8, int16, int32, int64, (*big.Int): timestamp = fmt.Sprintf("%d", data[0]) case float32, float64: timestamp = fmt.Sprintf("%.0f", data[0])