chore(all): replace all fmt.Errorf without paramters with errors.New (#21068)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user