ethclient,event: replace noarg fmt.Errorf with errors.New (#27334)

Signed-off-by: jsvisa <delweng@gmail.com>
This commit is contained in:
Delweng
2023-05-24 12:39:49 +02:00
committed by GitHub
parent e9c3183c52
commit b0095eeb20
3 changed files with 10 additions and 10 deletions
+2 -1
View File
@@ -17,6 +17,7 @@
package event
import (
"errors"
"fmt"
"reflect"
"sync"
@@ -68,7 +69,7 @@ func checkPanic(want error, fn func()) (err error) {
defer func() {
panic := recover()
if panic == nil {
err = fmt.Errorf("didn't panic")
err = errors.New("didn't panic")
} else if !reflect.DeepEqual(panic, want) {
err = fmt.Errorf("panicked with wrong error: got %q, want %q", panic, want)
}