From b5571728b3a26bf4b324e0c6e1e36b3e9181b3f9 Mon Sep 17 00:00:00 2001 From: Lincoln_Lee <138951227@qq.com> Date: Thu, 31 Dec 2020 14:52:18 +0800 Subject: [PATCH] fix: marshal function (#24) --- sonyflake/id.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sonyflake/id.go b/sonyflake/id.go index 4eeb9e3..e2b8011 100644 --- a/sonyflake/id.go +++ b/sonyflake/id.go @@ -18,8 +18,8 @@ func IDFromString(s string) (ID, error) { } // MarshalText ... -func (i *ID) MarshalText() ([]byte, error) { - return []byte(strconv.FormatInt(int64(*i), 10)), nil +func (i ID) MarshalText() ([]byte, error) { + return []byte(strconv.FormatInt(int64(i), 10)), nil } // UnmarshalText ...