Skip to content

Commit 3ee2d2b

Browse files
author
colinlyguo
committed
tweaks
1 parent 4b21c79 commit 3ee2d2b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

common/types/message/message.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,11 @@ func (e Byte48) MarshalText() ([]byte, error) {
6363
// overrite encode big
6464
if sign := i.Sign(); sign < 0 {
6565
// sanity check
66-
return nil, fmt.Errorf("Byte48 must be positive integer")
66+
return nil, errors.New("Byte48 must be positive integer")
6767
} else {
6868
s := i.Text(16)
6969
if len(s) > 96 {
70-
return nil, fmt.Errorf("Integer Exceed 384bit")
70+
return nil, errors.New("integer Exceed 384bit")
7171
}
7272
return []byte(fmt.Sprintf("0x%0*s", 96, s)), nil
7373
}
@@ -80,7 +80,7 @@ func isString(input []byte) bool {
8080
// hexutil.Big has limition of 256bit so we have to override it ...
8181
func (e *Byte48) UnmarshalJSON(input []byte) error {
8282
if !isString(input) {
83-
return fmt.Errorf("not hex string")
83+
return errors.New("not hex string")
8484
}
8585

8686
b, err := hexutil.Decode(string(input[1 : len(input)-1]))

0 commit comments

Comments
 (0)