Skip to content

Commit

Permalink
Add support to big.int timestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
catap committed Dec 15, 2016
1 parent d9baf0d commit 7b14a00
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion input/pickle.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"encoding/binary"
"fmt"
"io"
"math/big"
"net"

"github.com/graphite-ng/carbon-relay-ng/badmetrics"
Expand Down Expand Up @@ -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])
Expand Down

0 comments on commit 7b14a00

Please sign in to comment.