Skip to content

Commit 795f113

Browse files
authored
refactor: replace []byte(fmt.Sprintf) with fmt.Appendf (#489)
Signed-off-by: jinjiadu <jinjiadu@aliyun.com>
1 parent b2c549c commit 795f113

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/bigint/bigint.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type BigInt struct {
1515
}
1616

1717
func (i *BigInt) MarshalJSON() ([]byte, error) {
18-
return []byte(fmt.Sprintf(`"%s"`, i.String())), nil
18+
return fmt.Appendf(nil, `"%s"`, i.String()), nil
1919
}
2020

2121
func (i *BigInt) UnmarshalJSON(b []byte) error {

0 commit comments

Comments
 (0)