@@ -98,7 +98,7 @@ var linkFmtThreshold = (*Link)(new(big.Int).Exp(big.NewInt(10), big.NewInt(12),
9898// MarshalText implements the encoding.TextMarshaler interface.
9999func (l * Link ) MarshalText () ([]byte , error ) {
100100 if l .Cmp (linkFmtThreshold ) >= 0 {
101- return [] byte ( fmt .Sprintf ( "%s link" , decimal .NewFromBigInt (l .ToInt (), - 18 ) )), nil
101+ return fmt .Appendf ( nil , "%s link" , decimal .NewFromBigInt (l .ToInt (), - 18 )), nil
102102 }
103103 return (* big .Int )(l ).MarshalText ()
104104}
@@ -109,7 +109,7 @@ func (l Link) MarshalJSON() ([]byte, error) {
109109 if err != nil {
110110 return nil , err
111111 }
112- return [] byte ( fmt .Sprintf ( `"%s"` , value ) ), nil
112+ return fmt .Appendf ( nil , `"%s"` , value ), nil
113113}
114114
115115// UnmarshalJSON implements the json.Unmarshaler interface.
@@ -166,7 +166,7 @@ func (l Link) Value() (driver.Value, error) {
166166}
167167
168168// Scan reads the database value and returns an instance.
169- func (l * Link ) Scan (value interface {} ) error {
169+ func (l * Link ) Scan (value any ) error {
170170 switch v := value .(type ) {
171171 case string :
172172 decoded , ok := l .SetString (v , 10 )
0 commit comments