Skip to content

Commit

Permalink
fix: marshal function (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
wgliyuli committed Dec 31, 2020
1 parent 0c996cc commit b557172
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sonyflake/id.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 ...
Expand Down

0 comments on commit b557172

Please sign in to comment.