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
+2 -1
View File
@@ -2,6 +2,7 @@ package testdata
import (
"context"
"errors"
"fmt"
"testing"
@@ -27,7 +28,7 @@ var _ QueryServer = QueryImpl{}
func (e QueryImpl) TestAny(_ context.Context, request *TestAnyRequest) (*TestAnyResponse, error) {
animal, ok := request.AnyAnimal.GetCachedValue().(test.Animal)
if !ok {
return nil, fmt.Errorf("expected Animal")
return nil, errors.New("expected Animal")
}
any, err := types.NewAnyWithValue(animal.(proto.Message))