From 348dc1e55fb0539a66f5c0bca0f46dd322032b95 Mon Sep 17 00:00:00 2001 From: Bruce Marriner Date: Sat, 4 Jun 2016 15:52:39 -0500 Subject: [PATCH] Lint. --- snowflake.go | 1 + snowflake_test.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/snowflake.go b/snowflake.go index 4dc423c..fa6b034 100644 --- a/snowflake.go +++ b/snowflake.go @@ -123,6 +123,7 @@ func (f ID) Step() int64 { return int64(f) & 0x0000000000000FFF } +// MarshalJSON returns a json byte array string of the snowflake ID. func (f ID) MarshalJSON() ([]byte, error) { return []byte(`"` + f.String() + `"`), nil } diff --git a/snowflake_test.go b/snowflake_test.go index 159b869..dedd8a8 100644 --- a/snowflake_test.go +++ b/snowflake_test.go @@ -24,7 +24,7 @@ func BenchmarkUnmarshal(b *testing.B) { b.ResetTimer() for n := 0; n < b.N; n++ { - id2.UnmarshalJSON(id.Bytes()) + _ = id2.UnmarshalJSON(id.Bytes()) } }