Skip to content

Commit

Permalink
Merge pull request #147 from catap/big_int
Browse files Browse the repository at this point in the history
Add support to big.int timestamp
  • Loading branch information
Dieterbe committed Dec 15, 2016
2 parents d9baf0d + 7b14a00 commit de4ed44
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 de4ed44

Please sign in to comment.