Skip to content

Commit 472bcf6

Browse files
committed
cm: use errors.New
1 parent 833bf32 commit 472bcf6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cm/list_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package cm
33
import (
44
"bytes"
55
"encoding/json"
6-
"fmt"
6+
"errors"
77
"math"
88
"reflect"
99
"runtime"
@@ -321,9 +321,9 @@ type errorEntry struct {
321321
}
322322

323323
func (errorEntry) MarshalJSON() ([]byte, error) {
324-
return nil, fmt.Errorf("can't encode")
324+
return nil, errors.New("MarshalJSON")
325325
}
326326

327327
func (*errorEntry) UnmarshalJSON(_ []byte) error {
328-
return fmt.Errorf("can't decode")
328+
return errors.New("UnmarshalJSON")
329329
}

0 commit comments

Comments
 (0)