From 7f45c4319644ce002b4fbfcc4dc010fa39047388 Mon Sep 17 00:00:00 2001 From: Pedro Pombeiro Date: Wed, 15 Jan 2020 12:36:49 +0100 Subject: [PATCH] make lint-fix --- Makefile | 2 +- eth-node/bridge/geth/node.go | 3 ++- eth-node/core/types/transaction.go | 3 ++- eth-node/crypto/crypto.go | 4 +++- protocol/message_handler.go | 1 + protocol/messenger_contact_update_test.go | 5 +++-- protocol/messenger_installations_test.go | 5 +++-- protocol/persistence.go | 1 + protocol/transaction_validator.go | 8 +++++--- protocol/transaction_validator_test.go | 6 ++++-- protocol/transport/envelopes_monitor.go | 3 ++- .../status-im/status-go/eth-node/bridge/geth/node.go | 3 ++- .../status-go/eth-node/core/types/transaction.go | 3 ++- .../status-im/status-go/eth-node/crypto/crypto.go | 4 +++- .../status-im/status-go/protocol/message_handler.go | 1 + .../status-im/status-go/protocol/persistence.go | 1 + .../status-im/status-go/protocol/transaction_validator.go | 8 +++++--- .../status-go/protocol/transport/envelopes_monitor.go | 3 ++- 18 files changed, 43 insertions(+), 21 deletions(-) diff --git a/Makefile b/Makefile index 4b030edf3..e04f41364 100644 --- a/Makefile +++ b/Makefile @@ -177,7 +177,7 @@ clean-release: rm -rf $(RELEASE_DIR) lint-fix: - find . -name '*.go' -and -not -name 'bindata*' -and -not -name 'migrations.go' -and -not -wholename '*/vendor/*' -exec goimports -local 'github.com/ethereum/go-ethereum,github.com/status-im/status-go' -w {} \; + find . -name '*.go' -and -not -name '*.pb.go' -and -not -name 'bindata*' -and -not -name 'migrations.go' -and -not -wholename '*/vendor/*' -exec goimports -local 'github.com/ethereum/go-ethereum,github.com/status-im/status-go' -w {} \; $(MAKE) vendor check-existing-release: diff --git a/eth-node/bridge/geth/node.go b/eth-node/bridge/geth/node.go index 7c691c189..c4666fe5f 100644 --- a/eth-node/bridge/geth/node.go +++ b/eth-node/bridge/geth/node.go @@ -3,9 +3,10 @@ package gethbridge import ( "errors" - "github.com/status-im/status-go/waku" "go.uber.org/zap" + "github.com/status-im/status-go/waku" + "github.com/ethereum/go-ethereum/node" "github.com/ethereum/go-ethereum/p2p/enode" diff --git a/eth-node/core/types/transaction.go b/eth-node/core/types/transaction.go index bc41ec860..6bd2fee2c 100644 --- a/eth-node/core/types/transaction.go +++ b/eth-node/core/types/transaction.go @@ -1,8 +1,9 @@ package types import ( - "github.com/status-im/status-go/eth-node/types" "math/big" + + "github.com/status-im/status-go/eth-node/types" ) type Message struct { diff --git a/eth-node/crypto/crypto.go b/eth-node/crypto/crypto.go index ef4926251..3027be25c 100644 --- a/eth-node/crypto/crypto.go +++ b/eth-node/crypto/crypto.go @@ -9,9 +9,11 @@ import ( "encoding/hex" "errors" "fmt" - types "github.com/status-im/status-go/eth-node/types" + "golang.org/x/crypto/sha3" + types "github.com/status-im/status-go/eth-node/types" + gethcrypto "github.com/ethereum/go-ethereum/crypto" ) diff --git a/protocol/message_handler.go b/protocol/message_handler.go index d051f22e3..8324ea0ff 100644 --- a/protocol/message_handler.go +++ b/protocol/message_handler.go @@ -3,6 +3,7 @@ package protocol import ( "crypto/ecdsa" "encoding/hex" + "github.com/pkg/errors" "go.uber.org/zap" diff --git a/protocol/messenger_contact_update_test.go b/protocol/messenger_contact_update_test.go index f4c069529..88c116042 100644 --- a/protocol/messenger_contact_update_test.go +++ b/protocol/messenger_contact_update_test.go @@ -9,13 +9,14 @@ import ( "testing" "github.com/google/uuid" + "github.com/stretchr/testify/suite" + "go.uber.org/zap" + gethbridge "github.com/status-im/status-go/eth-node/bridge/geth" "github.com/status-im/status-go/eth-node/crypto" "github.com/status-im/status-go/eth-node/types" "github.com/status-im/status-go/protocol/tt" "github.com/status-im/status-go/whisper/v6" - "github.com/stretchr/testify/suite" - "go.uber.org/zap" ) func TestMessengerContactUpdateSuite(t *testing.T) { diff --git a/protocol/messenger_installations_test.go b/protocol/messenger_installations_test.go index 3f113610c..0a712119e 100644 --- a/protocol/messenger_installations_test.go +++ b/protocol/messenger_installations_test.go @@ -9,14 +9,15 @@ import ( "testing" "github.com/google/uuid" + "github.com/stretchr/testify/suite" + "go.uber.org/zap" + gethbridge "github.com/status-im/status-go/eth-node/bridge/geth" "github.com/status-im/status-go/eth-node/crypto" "github.com/status-im/status-go/eth-node/types" "github.com/status-im/status-go/protocol/encryption/multidevice" "github.com/status-im/status-go/protocol/tt" "github.com/status-im/status-go/whisper/v6" - "github.com/stretchr/testify/suite" - "go.uber.org/zap" ) func TestMessengerInstallationSuite(t *testing.T) { diff --git a/protocol/persistence.go b/protocol/persistence.go index 265b7f1c2..3207a7158 100644 --- a/protocol/persistence.go +++ b/protocol/persistence.go @@ -7,6 +7,7 @@ import ( "encoding/gob" "github.com/pkg/errors" + "github.com/status-im/status-go/eth-node/crypto" ) diff --git a/protocol/transaction_validator.go b/protocol/transaction_validator.go index fc5cd3550..b4160f895 100644 --- a/protocol/transaction_validator.go +++ b/protocol/transaction_validator.go @@ -7,13 +7,15 @@ import ( "fmt" "time" + "math/big" + "strings" + "github.com/pkg/errors" + "go.uber.org/zap" + coretypes "github.com/status-im/status-go/eth-node/core/types" "github.com/status-im/status-go/eth-node/crypto" "github.com/status-im/status-go/eth-node/types" - "go.uber.org/zap" - "math/big" - "strings" ) const ( diff --git a/protocol/transaction_validator_test.go b/protocol/transaction_validator_test.go index 2369246b6..503025fbb 100644 --- a/protocol/transaction_validator_test.go +++ b/protocol/transaction_validator_test.go @@ -7,12 +7,14 @@ import ( "strings" "testing" + "math/big" + + "github.com/stretchr/testify/suite" + coretypes "github.com/status-im/status-go/eth-node/core/types" "github.com/status-im/status-go/eth-node/crypto" "github.com/status-im/status-go/eth-node/types" "github.com/status-im/status-go/protocol/tt" - "github.com/stretchr/testify/suite" - "math/big" ) func padArray(bb []byte, size int) []byte { diff --git a/protocol/transport/envelopes_monitor.go b/protocol/transport/envelopes_monitor.go index 523323203..be1490565 100644 --- a/protocol/transport/envelopes_monitor.go +++ b/protocol/transport/envelopes_monitor.go @@ -1,8 +1,9 @@ package transport import ( - "github.com/status-im/status-go/eth-node/types" "go.uber.org/zap" + + "github.com/status-im/status-go/eth-node/types" ) type EnvelopesMonitorConfig struct { diff --git a/vendor/github.com/status-im/status-go/eth-node/bridge/geth/node.go b/vendor/github.com/status-im/status-go/eth-node/bridge/geth/node.go index 7c691c189..c4666fe5f 100644 --- a/vendor/github.com/status-im/status-go/eth-node/bridge/geth/node.go +++ b/vendor/github.com/status-im/status-go/eth-node/bridge/geth/node.go @@ -3,9 +3,10 @@ package gethbridge import ( "errors" - "github.com/status-im/status-go/waku" "go.uber.org/zap" + "github.com/status-im/status-go/waku" + "github.com/ethereum/go-ethereum/node" "github.com/ethereum/go-ethereum/p2p/enode" diff --git a/vendor/github.com/status-im/status-go/eth-node/core/types/transaction.go b/vendor/github.com/status-im/status-go/eth-node/core/types/transaction.go index bc41ec860..6bd2fee2c 100644 --- a/vendor/github.com/status-im/status-go/eth-node/core/types/transaction.go +++ b/vendor/github.com/status-im/status-go/eth-node/core/types/transaction.go @@ -1,8 +1,9 @@ package types import ( - "github.com/status-im/status-go/eth-node/types" "math/big" + + "github.com/status-im/status-go/eth-node/types" ) type Message struct { diff --git a/vendor/github.com/status-im/status-go/eth-node/crypto/crypto.go b/vendor/github.com/status-im/status-go/eth-node/crypto/crypto.go index ef4926251..3027be25c 100644 --- a/vendor/github.com/status-im/status-go/eth-node/crypto/crypto.go +++ b/vendor/github.com/status-im/status-go/eth-node/crypto/crypto.go @@ -9,9 +9,11 @@ import ( "encoding/hex" "errors" "fmt" - types "github.com/status-im/status-go/eth-node/types" + "golang.org/x/crypto/sha3" + types "github.com/status-im/status-go/eth-node/types" + gethcrypto "github.com/ethereum/go-ethereum/crypto" ) diff --git a/vendor/github.com/status-im/status-go/protocol/message_handler.go b/vendor/github.com/status-im/status-go/protocol/message_handler.go index d051f22e3..8324ea0ff 100644 --- a/vendor/github.com/status-im/status-go/protocol/message_handler.go +++ b/vendor/github.com/status-im/status-go/protocol/message_handler.go @@ -3,6 +3,7 @@ package protocol import ( "crypto/ecdsa" "encoding/hex" + "github.com/pkg/errors" "go.uber.org/zap" diff --git a/vendor/github.com/status-im/status-go/protocol/persistence.go b/vendor/github.com/status-im/status-go/protocol/persistence.go index 265b7f1c2..3207a7158 100644 --- a/vendor/github.com/status-im/status-go/protocol/persistence.go +++ b/vendor/github.com/status-im/status-go/protocol/persistence.go @@ -7,6 +7,7 @@ import ( "encoding/gob" "github.com/pkg/errors" + "github.com/status-im/status-go/eth-node/crypto" ) diff --git a/vendor/github.com/status-im/status-go/protocol/transaction_validator.go b/vendor/github.com/status-im/status-go/protocol/transaction_validator.go index fc5cd3550..b4160f895 100644 --- a/vendor/github.com/status-im/status-go/protocol/transaction_validator.go +++ b/vendor/github.com/status-im/status-go/protocol/transaction_validator.go @@ -7,13 +7,15 @@ import ( "fmt" "time" + "math/big" + "strings" + "github.com/pkg/errors" + "go.uber.org/zap" + coretypes "github.com/status-im/status-go/eth-node/core/types" "github.com/status-im/status-go/eth-node/crypto" "github.com/status-im/status-go/eth-node/types" - "go.uber.org/zap" - "math/big" - "strings" ) const ( diff --git a/vendor/github.com/status-im/status-go/protocol/transport/envelopes_monitor.go b/vendor/github.com/status-im/status-go/protocol/transport/envelopes_monitor.go index 523323203..be1490565 100644 --- a/vendor/github.com/status-im/status-go/protocol/transport/envelopes_monitor.go +++ b/vendor/github.com/status-im/status-go/protocol/transport/envelopes_monitor.go @@ -1,8 +1,9 @@ package transport import ( - "github.com/status-im/status-go/eth-node/types" "go.uber.org/zap" + + "github.com/status-im/status-go/eth-node/types" ) type EnvelopesMonitorConfig struct {