Skip to content

Commit 810f9e0

Browse files
authored
all: remove redundant conversions and import names (#21903)
1 parent f59ed35 commit 810f9e0

44 files changed

Lines changed: 66 additions & 67 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎accounts/abi/reflect_test.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,12 +202,12 @@ func TestConvertType(t *testing.T) {
202202
fields = append(fields, reflect.StructField{
203203
Name: "X",
204204
Type: reflect.TypeOf(new(big.Int)),
205-
Tag: reflect.StructTag("json:\"" + "x" + "\""),
205+
Tag: "json:\"" + "x" + "\"",
206206
})
207207
fields = append(fields, reflect.StructField{
208208
Name: "Y",
209209
Type: reflect.TypeOf(new(big.Int)),
210-
Tag: reflect.StructTag("json:\"" + "y" + "\""),
210+
Tag: "json:\"" + "y" + "\"",
211211
})
212212
val := reflect.New(reflect.StructOf(fields))
213213
val.Elem().Field(0).Set(reflect.ValueOf(big.NewInt(1)))

‎accounts/abi/type_test.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ func TestTypeCheck(t *testing.T) {
255255
{"bytes", nil, [2]byte{0, 1}, "abi: cannot use array as type slice as argument"},
256256
{"bytes", nil, common.Hash{1}, "abi: cannot use array as type slice as argument"},
257257
{"string", nil, "hello world", ""},
258-
{"string", nil, string(""), ""},
258+
{"string", nil, "", ""},
259259
{"string", nil, []byte{}, "abi: cannot use slice as type string as argument"},
260260
{"bytes32[]", nil, [][32]byte{{}}, ""},
261261
{"function", nil, [24]byte{}, ""},

‎accounts/accounts.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import (
2121
"fmt"
2222
"math/big"
2323

24-
ethereum "github.com/ethereum/go-ethereum"
24+
"github.com/ethereum/go-ethereum"
2525
"github.com/ethereum/go-ethereum/common"
2626
"github.com/ethereum/go-ethereum/core/types"
2727
"github.com/ethereum/go-ethereum/event"

‎accounts/keystore/passphrase.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ func DecryptKey(keyjson []byte, auth string) (*Key, error) {
230230
key := crypto.ToECDSAUnsafe(keyBytes)
231231

232232
return &Key{
233-
Id: uuid.UUID(keyId),
233+
Id: keyId,
234234
Address: crypto.PubkeyToAddress(key.PublicKey),
235235
PrivateKey: key,
236236
}, nil

‎accounts/keystore/wallet.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ package keystore
1919
import (
2020
"math/big"
2121

22-
ethereum "github.com/ethereum/go-ethereum"
22+
"github.com/ethereum/go-ethereum"
2323
"github.com/ethereum/go-ethereum/accounts"
2424
"github.com/ethereum/go-ethereum/core/types"
2525
"github.com/ethereum/go-ethereum/crypto"

‎accounts/scwallet/wallet.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import (
3333
"sync"
3434
"time"
3535

36-
ethereum "github.com/ethereum/go-ethereum"
36+
"github.com/ethereum/go-ethereum"
3737
"github.com/ethereum/go-ethereum/accounts"
3838
"github.com/ethereum/go-ethereum/common"
3939
"github.com/ethereum/go-ethereum/core/types"

‎accounts/usbwallet/wallet.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import (
2525
"sync"
2626
"time"
2727

28-
ethereum "github.com/ethereum/go-ethereum"
28+
"github.com/ethereum/go-ethereum"
2929
"github.com/ethereum/go-ethereum/accounts"
3030
"github.com/ethereum/go-ethereum/common"
3131
"github.com/ethereum/go-ethereum/core/types"

‎cmd/clef/main.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ import (
5454
"github.com/ethereum/go-ethereum/signer/rules"
5555
"github.com/ethereum/go-ethereum/signer/storage"
5656

57-
colorable "github.com/mattn/go-colorable"
57+
"github.com/mattn/go-colorable"
5858
"github.com/mattn/go-isatty"
5959
"gopkg.in/urfave/cli.v1"
6060
)

‎cmd/devp2p/dnscmd.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import (
3030
"github.com/ethereum/go-ethereum/console/prompt"
3131
"github.com/ethereum/go-ethereum/p2p/dnsdisc"
3232
"github.com/ethereum/go-ethereum/p2p/enode"
33-
cli "gopkg.in/urfave/cli.v1"
33+
"gopkg.in/urfave/cli.v1"
3434
)
3535

3636
var (

‎cmd/evm/compiler.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import (
2323

2424
"github.com/ethereum/go-ethereum/cmd/evm/internal/compiler"
2525

26-
cli "gopkg.in/urfave/cli.v1"
26+
"gopkg.in/urfave/cli.v1"
2727
)
2828

2929
var compileCommand = cli.Command{

0 commit comments

Comments
 (0)