From b24f6b7c3cefcfbc4fee624319dca48c86c0f38b Mon Sep 17 00:00:00 2001 From: Daniel Liu Date: Fri, 10 Jan 2025 09:30:30 +0800 Subject: [PATCH] accounts: fix errors checked by go-staticcheck ST1005 (#28532) --- accounts/abi/pack.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/accounts/abi/pack.go b/accounts/abi/pack.go index 42b314c73417b..91e2d82e8f83c 100644 --- a/accounts/abi/pack.go +++ b/accounts/abi/pack.go @@ -57,7 +57,7 @@ func packElement(t Type, reflectValue reflect.Value) ([]byte, error) { reflectValue = mustArrayToByteSlice(reflectValue) } if reflectValue.Type() != reflect.TypeOf([]byte{}) { - return []byte{}, errors.New("Bytes type is neither slice nor array") + return []byte{}, errors.New("bytes type is neither slice nor array") } return packBytesSlice(reflectValue.Bytes(), reflectValue.Len()), nil case FixedBytesTy, FunctionTy: @@ -66,7 +66,7 @@ func packElement(t Type, reflectValue reflect.Value) ([]byte, error) { } return common.RightPadBytes(reflectValue.Bytes(), 32), nil default: - return []byte{}, fmt.Errorf("Could not pack element, unknown type: %v", t.T) + return []byte{}, fmt.Errorf("could not pack element, unknown type: %v", t.T) } }