chore(all): replace all fmt.Errorf without paramters with errors.New (#21068)

This commit is contained in:
yukionfire
2024-07-25 14:54:49 +02:00
committed by GitHub
parent 6a2d039e12
commit d6ad92db0f
57 changed files with 127 additions and 103 deletions
+3 -2
View File
@@ -2,6 +2,7 @@ package integration_test
import (
"context"
"errors"
"fmt"
"io"
"testing"
@@ -112,7 +113,7 @@ func Example() {
// in this example the result is an empty response, a nil check is enough
// in other cases, it is recommended to check the result value.
if result == nil {
panic(fmt.Errorf("unexpected nil result"))
panic(errors.New("unexpected nil result"))
}
// we now check the result
@@ -220,7 +221,7 @@ func Example_oneModule() {
// in this example the result is an empty response, a nil check is enough
// in other cases, it is recommended to check the result value.
if result == nil {
panic(fmt.Errorf("unexpected nil result"))
panic(errors.New("unexpected nil result"))
}
// we now check the result