From 9343327d376f016c4b8874f10c92d83ef21cd207 Mon Sep 17 00:00:00 2001 From: crusader Date: Wed, 4 Jul 2018 16:43:17 +0900 Subject: [PATCH] ing --- encoding/json/number.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/encoding/json/number.go b/encoding/json/number.go index 936ba86..04f2969 100644 --- a/encoding/json/number.go +++ b/encoding/json/number.go @@ -12,3 +12,7 @@ func NumberToInt(n json.Number) (int, error) { } return int(n64), nil } + +func NumberToInt64(n json.Number) (int64, error) { + return strconv.ParseInt(n.String(), 10, 64) +}