From dea717b9f4c5ce1a977da20cd949cda9b7bf13d3 Mon Sep 17 00:00:00 2001 From: Thomas Modeneis Date: Thu, 5 Apr 2018 21:02:25 +0200 Subject: [PATCH] goimports incorrectly removed valid imports, manually restoring all files to original state add task for format only as this is blocking lint validations update linters to also lint test files --- Makefile | 2 +- accounts/abi/bind/backend.go | 1 + accounts/abi/bind/backends/simulated.go | 1 + accounts/abi/bind/base.go | 1 + accounts/abi/bind/bind.go | 3 +-- accounts/keystore/account_cache.go | 2 ++ accounts/keystore/file_cache.go | 3 +-- build/ci.go | 1 + build/gofmt.sh | 16 ++++++++++++++++ cmd/ethkey/generate.go | 1 + cmd/ethkey/inspect.go | 1 + cmd/ethkey/main.go | 1 + cmd/ethkey/message.go | 1 + cmd/ethkey/utils.go | 1 + cmd/evm/main.go | 1 + cmd/geth/accountcmd.go | 1 + cmd/geth/chaincmd.go | 4 ++-- cmd/geth/consolecmd.go | 1 + cmd/geth/main.go | 1 + cmd/geth/misccmd.go | 1 + cmd/geth/monitorcmd.go | 4 ++-- cmd/geth/usage.go | 1 + cmd/p2psim/main.go | 2 ++ cmd/puppeth/puppeth.go | 1 + cmd/swarm/db.go | 1 + cmd/swarm/hash.go | 1 + cmd/swarm/list.go | 1 + cmd/swarm/main.go | 2 ++ cmd/swarm/manifest.go | 1 + cmd/swarm/upload.go | 1 + cmd/utils/customflags.go | 1 + cmd/utils/flags.go | 1 + console/console.go | 1 + core/blockchain.go | 4 ++-- core/headerchain.go | 2 ++ eth/peer.go | 1 + ethclient/ethclient.go | 1 + ethclient/ethclient_test.go | 2 ++ internal/debug/flags.go | 1 + light/lightchain.go | 1 + miner/worker.go | 1 + p2p/nat/nat.go | 1 + p2p/nat/natpmp.go | 2 ++ rpc/ipc_windows.go | 2 ++ rpc/server.go | 1 + rpc/types.go | 1 + rpc/websocket.go | 1 + swarm/metrics/flags.go | 1 + .../Azure/go-autorest/autorest/azure/token.go | 1 + .../StackExchange/wmi/swbemservices.go | 1 + vendor/github.com/StackExchange/wmi/wmi.go | 1 + vendor/github.com/fatih/color/color.go | 3 +++ vendor/github.com/gizak/termui/events.go | 2 ++ vendor/github.com/gizak/termui/textbuilder.go | 2 ++ .../mattn/go-colorable/colorable_windows.go | 2 ++ vendor/github.com/nsf/termbox-go/api.go | 1 + .../github.com/nsf/termbox-go/termbox_windows.go | 1 + vendor/github.com/olekukonko/tablewriter/util.go | 2 ++ .../github.com/robertkrimen/otto/ast/comments.go | 1 - vendor/github.com/robertkrimen/otto/file/file.go | 2 ++ .../robertkrimen/otto/parser/parser.go | 1 + vendor/github.com/robertkrimen/otto/result.go | 2 ++ .../stretchr/testify/require/require.go | 3 +-- .../stretchr/testify/require/require_forward.go | 3 +-- .../syndtr/goleveldb/leveldb/storage.go | 3 +-- .../golang.org/x/crypto/openpgp/armor/armor.go | 3 +-- .../x/crypto/openpgp/packet/compressed.go | 3 +-- .../crypto/openpgp/packet/one_pass_signature.go | 5 ++--- .../golang.org/x/crypto/openpgp/packet/packet.go | 5 ++--- .../golang.org/x/crypto/openpgp/packet/reader.go | 3 +-- .../openpgp/packet/symmetrically_encrypted.go | 3 +-- .../x/crypto/ssh/terminal/util_solaris.go | 3 +-- vendor/gopkg.in/check.v1/benchmark.go | 6 +++--- whisper/shhclient/client.go | 1 + 74 files changed, 110 insertions(+), 37 deletions(-) create mode 100755 build/gofmt.sh diff --git a/Makefile b/Makefile index 325f7241c4..744a3511aa 100644 --- a/Makefile +++ b/Makefile @@ -41,7 +41,7 @@ lint: ## Run linters. Use make install-linters first. build/env.sh go run build/ci.go lint format: # Formats the code. Must have goimports installed - goimports -w -local github.com/ethereum/go-ethereum ./ + build/gofmt.sh clean: rm -fr build/_workspace/pkg/ $(GOBIN)/* diff --git a/accounts/abi/bind/backend.go b/accounts/abi/bind/backend.go index 0eab5aea3f..ca60cc1b43 100644 --- a/accounts/abi/bind/backend.go +++ b/accounts/abi/bind/backend.go @@ -21,6 +21,7 @@ import ( "errors" "math/big" + "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" ) diff --git a/accounts/abi/bind/backends/simulated.go b/accounts/abi/bind/backends/simulated.go index 337f893518..2b5c5fc4a4 100644 --- a/accounts/abi/bind/backends/simulated.go +++ b/accounts/abi/bind/backends/simulated.go @@ -24,6 +24,7 @@ import ( "sync" "time" + "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/math" diff --git a/accounts/abi/bind/base.go b/accounts/abi/bind/base.go index a8c2b7ff51..83ad1c8ae7 100644 --- a/accounts/abi/bind/base.go +++ b/accounts/abi/bind/base.go @@ -22,6 +22,7 @@ import ( "fmt" "math/big" + "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" diff --git a/accounts/abi/bind/bind.go b/accounts/abi/bind/bind.go index 6a5c609313..411177057b 100644 --- a/accounts/abi/bind/bind.go +++ b/accounts/abi/bind/bind.go @@ -28,9 +28,8 @@ import ( "text/template" "unicode" - "golang.org/x/tools/imports" - "github.com/ethereum/go-ethereum/accounts/abi" + "golang.org/x/tools/imports" ) // Lang is a target programming language selector to generate bindings for. diff --git a/accounts/keystore/account_cache.go b/accounts/keystore/account_cache.go index 0d0238638a..95c4dec268 100644 --- a/accounts/keystore/account_cache.go +++ b/accounts/keystore/account_cache.go @@ -27,6 +27,8 @@ import ( "sync" "time" + "gopkg.in/fatih/set.v0" + "github.com/ethereum/go-ethereum/accounts" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/log" diff --git a/accounts/keystore/file_cache.go b/accounts/keystore/file_cache.go index 86aa765a34..c91b7b7b61 100644 --- a/accounts/keystore/file_cache.go +++ b/accounts/keystore/file_cache.go @@ -24,9 +24,8 @@ import ( "sync" "time" - set "gopkg.in/fatih/set.v0" - "github.com/ethereum/go-ethereum/log" + set "gopkg.in/fatih/set.v0" ) // fileCache is a cache of files seen during scan of keystore. diff --git a/build/ci.go b/build/ci.go index f74f0a902a..9214ebd8c6 100644 --- a/build/ci.go +++ b/build/ci.go @@ -332,6 +332,7 @@ func doLint(cmdline []string) { // Run fast linters batched together configs := []string{ "--vendor", + "--tests", "--disable-all", "--enable=goimports", "--enable=varcheck", diff --git a/build/gofmt.sh b/build/gofmt.sh new file mode 100755 index 0000000000..6bc848e20e --- /dev/null +++ b/build/gofmt.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +find_files() { + find . -not \( \ + \( \ + -wholename '.github' \ + -o -wholename './build/_workspace' \ + -o -wholename './build/bin' \ + -o -wholename './crypto/bn256' \ + -o -wholename '*/vendor/*' \ + \) -prune \ + \) -name '*.go' +} + +GOFMT="gofmt -s -w"; +find_files | xargs $GOFMT; \ No newline at end of file diff --git a/cmd/ethkey/generate.go b/cmd/ethkey/generate.go index f81c63baa4..b4d22613bd 100644 --- a/cmd/ethkey/generate.go +++ b/cmd/ethkey/generate.go @@ -24,6 +24,7 @@ import ( "path/filepath" "github.com/pborman/uuid" + "gopkg.in/urfave/cli.v1" "github.com/ethereum/go-ethereum/accounts/keystore" "github.com/ethereum/go-ethereum/cmd/utils" diff --git a/cmd/ethkey/inspect.go b/cmd/ethkey/inspect.go index c8a8e7df56..dbf5afc0ce 100644 --- a/cmd/ethkey/inspect.go +++ b/cmd/ethkey/inspect.go @@ -24,6 +24,7 @@ import ( "github.com/ethereum/go-ethereum/accounts/keystore" "github.com/ethereum/go-ethereum/cmd/utils" "github.com/ethereum/go-ethereum/crypto" + "gopkg.in/urfave/cli.v1" ) type outputInspect struct { diff --git a/cmd/ethkey/main.go b/cmd/ethkey/main.go index 201f0120f9..7543c1efdb 100644 --- a/cmd/ethkey/main.go +++ b/cmd/ethkey/main.go @@ -21,6 +21,7 @@ import ( "os" "github.com/ethereum/go-ethereum/cmd/utils" + "gopkg.in/urfave/cli.v1" ) const ( diff --git a/cmd/ethkey/message.go b/cmd/ethkey/message.go index db21c6b20b..531a931c82 100644 --- a/cmd/ethkey/message.go +++ b/cmd/ethkey/message.go @@ -25,6 +25,7 @@ import ( "github.com/ethereum/go-ethereum/cmd/utils" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" + "gopkg.in/urfave/cli.v1" ) type outputSign struct { diff --git a/cmd/ethkey/utils.go b/cmd/ethkey/utils.go index 81dfcdcfba..0e563bf922 100644 --- a/cmd/ethkey/utils.go +++ b/cmd/ethkey/utils.go @@ -25,6 +25,7 @@ import ( "github.com/ethereum/go-ethereum/cmd/utils" "github.com/ethereum/go-ethereum/console" "github.com/ethereum/go-ethereum/crypto" + "gopkg.in/urfave/cli.v1" ) // getPassPhrase obtains a passphrase given by the user. It first checks the diff --git a/cmd/evm/main.go b/cmd/evm/main.go index 64e9457a9e..a59cb1fb84 100644 --- a/cmd/evm/main.go +++ b/cmd/evm/main.go @@ -23,6 +23,7 @@ import ( "os" "github.com/ethereum/go-ethereum/cmd/utils" + "gopkg.in/urfave/cli.v1" ) var gitCommit = "" // Git SHA1 commit hash of the release (set via linker flags) diff --git a/cmd/geth/accountcmd.go b/cmd/geth/accountcmd.go index 586e286ad7..0db5c4ce0f 100644 --- a/cmd/geth/accountcmd.go +++ b/cmd/geth/accountcmd.go @@ -26,6 +26,7 @@ import ( "github.com/ethereum/go-ethereum/console" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/log" + "gopkg.in/urfave/cli.v1" ) var ( diff --git a/cmd/geth/chaincmd.go b/cmd/geth/chaincmd.go index ea5e52fa6f..d3086921b9 100644 --- a/cmd/geth/chaincmd.go +++ b/cmd/geth/chaincmd.go @@ -25,8 +25,6 @@ import ( "sync/atomic" "time" - "github.com/syndtr/goleveldb/leveldb/util" - "github.com/ethereum/go-ethereum/cmd/utils" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/console" @@ -38,6 +36,8 @@ import ( "github.com/ethereum/go-ethereum/event" "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/trie" + "github.com/syndtr/goleveldb/leveldb/util" + "gopkg.in/urfave/cli.v1" ) var ( diff --git a/cmd/geth/consolecmd.go b/cmd/geth/consolecmd.go index c8d0cc4197..2500a969cf 100644 --- a/cmd/geth/consolecmd.go +++ b/cmd/geth/consolecmd.go @@ -28,6 +28,7 @@ import ( "github.com/ethereum/go-ethereum/console" "github.com/ethereum/go-ethereum/node" "github.com/ethereum/go-ethereum/rpc" + "gopkg.in/urfave/cli.v1" ) var ( diff --git a/cmd/geth/main.go b/cmd/geth/main.go index 9c9fb557ec..d94154245f 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -35,6 +35,7 @@ import ( "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/metrics" "github.com/ethereum/go-ethereum/node" + "gopkg.in/urfave/cli.v1" ) const ( diff --git a/cmd/geth/misccmd.go b/cmd/geth/misccmd.go index 179e2046bb..aa9b1ee568 100644 --- a/cmd/geth/misccmd.go +++ b/cmd/geth/misccmd.go @@ -27,6 +27,7 @@ import ( "github.com/ethereum/go-ethereum/consensus/ethash" "github.com/ethereum/go-ethereum/eth" "github.com/ethereum/go-ethereum/params" + "gopkg.in/urfave/cli.v1" ) var ( diff --git a/cmd/geth/monitorcmd.go b/cmd/geth/monitorcmd.go index e188fc9771..cd19caa276 100644 --- a/cmd/geth/monitorcmd.go +++ b/cmd/geth/monitorcmd.go @@ -25,11 +25,11 @@ import ( "strings" "time" - "github.com/gizak/termui" - "github.com/ethereum/go-ethereum/cmd/utils" "github.com/ethereum/go-ethereum/node" "github.com/ethereum/go-ethereum/rpc" + "github.com/gizak/termui" + "gopkg.in/urfave/cli.v1" ) var ( diff --git a/cmd/geth/usage.go b/cmd/geth/usage.go index abadd66d64..a1558c2330 100644 --- a/cmd/geth/usage.go +++ b/cmd/geth/usage.go @@ -26,6 +26,7 @@ import ( "github.com/ethereum/go-ethereum/cmd/utils" "github.com/ethereum/go-ethereum/internal/debug" + "gopkg.in/urfave/cli.v1" ) // AppHelpTemplate is the test template for the default, global app help topic. diff --git a/cmd/p2psim/main.go b/cmd/p2psim/main.go index e595a6d845..38a54add4e 100644 --- a/cmd/p2psim/main.go +++ b/cmd/p2psim/main.go @@ -45,6 +45,8 @@ import ( "strings" "text/tabwriter" + "gopkg.in/urfave/cli.v1" + "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/p2p" "github.com/ethereum/go-ethereum/p2p/discover" diff --git a/cmd/puppeth/puppeth.go b/cmd/puppeth/puppeth.go index 7b32ed4592..f9b8fe4811 100644 --- a/cmd/puppeth/puppeth.go +++ b/cmd/puppeth/puppeth.go @@ -24,6 +24,7 @@ import ( "time" "github.com/ethereum/go-ethereum/log" + "gopkg.in/urfave/cli.v1" ) // main is just a boring entry point to set up the CLI app. diff --git a/cmd/swarm/db.go b/cmd/swarm/db.go index 99d2755064..dfd2d069b9 100644 --- a/cmd/swarm/db.go +++ b/cmd/swarm/db.go @@ -25,6 +25,7 @@ import ( "github.com/ethereum/go-ethereum/cmd/utils" "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/swarm/storage" + "gopkg.in/urfave/cli.v1" ) func dbExport(ctx *cli.Context) { diff --git a/cmd/swarm/hash.go b/cmd/swarm/hash.go index 1423fcf61f..792e8d0d7a 100644 --- a/cmd/swarm/hash.go +++ b/cmd/swarm/hash.go @@ -23,6 +23,7 @@ import ( "github.com/ethereum/go-ethereum/cmd/utils" "github.com/ethereum/go-ethereum/swarm/storage" + "gopkg.in/urfave/cli.v1" ) func hash(ctx *cli.Context) { diff --git a/cmd/swarm/list.go b/cmd/swarm/list.go index 8d5045aef5..57b5517c6e 100644 --- a/cmd/swarm/list.go +++ b/cmd/swarm/list.go @@ -24,6 +24,7 @@ import ( "github.com/ethereum/go-ethereum/cmd/utils" swarm "github.com/ethereum/go-ethereum/swarm/api/client" + "gopkg.in/urfave/cli.v1" ) func list(ctx *cli.Context) { diff --git a/cmd/swarm/main.go b/cmd/swarm/main.go index 6ec48b1e6d..360020b77b 100644 --- a/cmd/swarm/main.go +++ b/cmd/swarm/main.go @@ -44,6 +44,8 @@ import ( "github.com/ethereum/go-ethereum/swarm" bzzapi "github.com/ethereum/go-ethereum/swarm/api" swarmmetrics "github.com/ethereum/go-ethereum/swarm/metrics" + + "gopkg.in/urfave/cli.v1" ) const clientIdentifier = "swarm" diff --git a/cmd/swarm/manifest.go b/cmd/swarm/manifest.go index 53ead5ec36..41a69a5d05 100644 --- a/cmd/swarm/manifest.go +++ b/cmd/swarm/manifest.go @@ -27,6 +27,7 @@ import ( "github.com/ethereum/go-ethereum/cmd/utils" "github.com/ethereum/go-ethereum/swarm/api" swarm "github.com/ethereum/go-ethereum/swarm/api/client" + "gopkg.in/urfave/cli.v1" ) const bzzManifestJSON = "application/bzz-manifest+json" diff --git a/cmd/swarm/upload.go b/cmd/swarm/upload.go index 28845a4abb..9f4c525bb9 100644 --- a/cmd/swarm/upload.go +++ b/cmd/swarm/upload.go @@ -32,6 +32,7 @@ import ( "github.com/ethereum/go-ethereum/cmd/utils" swarm "github.com/ethereum/go-ethereum/swarm/api/client" + "gopkg.in/urfave/cli.v1" ) func upload(ctx *cli.Context) { diff --git a/cmd/utils/customflags.go b/cmd/utils/customflags.go index ff515a651f..e5bf8724c1 100644 --- a/cmd/utils/customflags.go +++ b/cmd/utils/customflags.go @@ -28,6 +28,7 @@ import ( "strings" "github.com/ethereum/go-ethereum/common/math" + "gopkg.in/urfave/cli.v1" ) // Custom type which is registered in the flags library which cli uses for diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index 069170e89b..4f3d81f5d2 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -56,6 +56,7 @@ import ( "github.com/ethereum/go-ethereum/p2p/netutil" "github.com/ethereum/go-ethereum/params" whisper "github.com/ethereum/go-ethereum/whisper/whisperv6" + "gopkg.in/urfave/cli.v1" ) var ( diff --git a/console/console.go b/console/console.go index ff640bd824..cef5d3c7be 100644 --- a/console/console.go +++ b/console/console.go @@ -28,6 +28,7 @@ import ( "strings" "syscall" + "github.com/mattn/go-colorable" "github.com/peterh/liner" "github.com/robertkrimen/otto" diff --git a/core/blockchain.go b/core/blockchain.go index e15438e808..b33eb85a44 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -27,8 +27,6 @@ import ( "sync/atomic" "time" - "gopkg.in/karalabe/cookiejar.v2/collections/prque" - "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/mclock" "github.com/ethereum/go-ethereum/consensus" @@ -43,6 +41,8 @@ import ( "github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/rlp" "github.com/ethereum/go-ethereum/trie" + "github.com/hashicorp/golang-lru" + "gopkg.in/karalabe/cookiejar.v2/collections/prque" ) var ( diff --git a/core/headerchain.go b/core/headerchain.go index 2eecd8bfbe..70dfe6dd20 100644 --- a/core/headerchain.go +++ b/core/headerchain.go @@ -26,6 +26,8 @@ import ( "sync/atomic" "time" + "github.com/hashicorp/golang-lru" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/consensus" "github.com/ethereum/go-ethereum/core/types" diff --git a/eth/peer.go b/eth/peer.go index 37a5340218..42ead53965 100644 --- a/eth/peer.go +++ b/eth/peer.go @@ -27,6 +27,7 @@ import ( "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/p2p" "github.com/ethereum/go-ethereum/rlp" + "gopkg.in/fatih/set.v0" ) var ( diff --git a/ethclient/ethclient.go b/ethclient/ethclient.go index ab57239576..87a912901a 100644 --- a/ethclient/ethclient.go +++ b/ethclient/ethclient.go @@ -24,6 +24,7 @@ import ( "fmt" "math/big" + "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/core/types" diff --git a/ethclient/ethclient_test.go b/ethclient/ethclient_test.go index a24b03af0d..178eb2be98 100644 --- a/ethclient/ethclient_test.go +++ b/ethclient/ethclient_test.go @@ -16,6 +16,8 @@ package ethclient +import "github.com/ethereum/go-ethereum" + // Verify that Client implements the ethereum interfaces. var ( _ = ethereum.ChainReader(&Client{}) diff --git a/internal/debug/flags.go b/internal/debug/flags.go index 63149ac99e..d928ea71b8 100644 --- a/internal/debug/flags.go +++ b/internal/debug/flags.go @@ -30,6 +30,7 @@ import ( "github.com/ethereum/go-ethereum/log/term" "github.com/ethereum/go-ethereum/metrics" "github.com/ethereum/go-ethereum/metrics/exp" + "gopkg.in/urfave/cli.v1" ) var ( diff --git a/light/lightchain.go b/light/lightchain.go index b805541e14..2784615d35 100644 --- a/light/lightchain.go +++ b/light/lightchain.go @@ -34,6 +34,7 @@ import ( "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/rlp" + "github.com/hashicorp/golang-lru" ) var ( diff --git a/miner/worker.go b/miner/worker.go index af49e44b4b..15395ae0b9 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -35,6 +35,7 @@ import ( "github.com/ethereum/go-ethereum/event" "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/params" + "gopkg.in/fatih/set.v0" ) const ( diff --git a/p2p/nat/nat.go b/p2p/nat/nat.go index 827595fc4b..a254648c66 100644 --- a/p2p/nat/nat.go +++ b/p2p/nat/nat.go @@ -26,6 +26,7 @@ import ( "time" "github.com/ethereum/go-ethereum/log" + "github.com/jackpal/go-nat-pmp" ) // An implementation of nat.Interface can map local ports to ports diff --git a/p2p/nat/natpmp.go b/p2p/nat/natpmp.go index b574e78bbe..577a424fbe 100644 --- a/p2p/nat/natpmp.go +++ b/p2p/nat/natpmp.go @@ -21,6 +21,8 @@ import ( "net" "strings" "time" + + "github.com/jackpal/go-nat-pmp" ) // natPMPClient adapts the NAT-PMP protocol implementation so it conforms to diff --git a/rpc/ipc_windows.go b/rpc/ipc_windows.go index e8761e11fc..ca56a3ce43 100644 --- a/rpc/ipc_windows.go +++ b/rpc/ipc_windows.go @@ -22,6 +22,8 @@ import ( "context" "net" "time" + + "gopkg.in/natefinch/npipe.v2" ) // This is used if the dialing context has no deadline. It is much smaller than the diff --git a/rpc/server.go b/rpc/server.go index 34b12f581a..11373b504c 100644 --- a/rpc/server.go +++ b/rpc/server.go @@ -26,6 +26,7 @@ import ( "sync/atomic" "github.com/ethereum/go-ethereum/log" + "gopkg.in/fatih/set.v0" ) const MetadataApi = "rpc" diff --git a/rpc/types.go b/rpc/types.go index 227568de01..f2375604ed 100644 --- a/rpc/types.go +++ b/rpc/types.go @@ -24,6 +24,7 @@ import ( "sync" "github.com/ethereum/go-ethereum/common/hexutil" + "gopkg.in/fatih/set.v0" ) // API describes the set of methods offered over the RPC interface diff --git a/rpc/websocket.go b/rpc/websocket.go index 0354af32a2..59a0420c03 100644 --- a/rpc/websocket.go +++ b/rpc/websocket.go @@ -32,6 +32,7 @@ import ( "golang.org/x/net/websocket" "github.com/ethereum/go-ethereum/log" + "gopkg.in/fatih/set.v0" ) // websocketJSONCodec is a custom JSON codec with payload size enforcement and diff --git a/swarm/metrics/flags.go b/swarm/metrics/flags.go index 00edaebf42..48b231b219 100644 --- a/swarm/metrics/flags.go +++ b/swarm/metrics/flags.go @@ -23,6 +23,7 @@ import ( "github.com/ethereum/go-ethereum/log" gethmetrics "github.com/ethereum/go-ethereum/metrics" "github.com/ethereum/go-ethereum/metrics/influxdb" + "gopkg.in/urfave/cli.v1" ) var ( diff --git a/vendor/github.com/Azure/go-autorest/autorest/azure/token.go b/vendor/github.com/Azure/go-autorest/autorest/azure/token.go index b4c0345921..cfcd030114 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/azure/token.go +++ b/vendor/github.com/Azure/go-autorest/autorest/azure/token.go @@ -13,6 +13,7 @@ import ( "time" "github.com/Azure/go-autorest/autorest" + "github.com/dgrijalva/jwt-go" ) const ( diff --git a/vendor/github.com/StackExchange/wmi/swbemservices.go b/vendor/github.com/StackExchange/wmi/swbemservices.go index 18fcca61b3..9765a53f74 100644 --- a/vendor/github.com/StackExchange/wmi/swbemservices.go +++ b/vendor/github.com/StackExchange/wmi/swbemservices.go @@ -8,6 +8,7 @@ import ( "runtime" "sync" + "github.com/go-ole/go-ole" "github.com/go-ole/go-ole/oleutil" ) diff --git a/vendor/github.com/StackExchange/wmi/wmi.go b/vendor/github.com/StackExchange/wmi/wmi.go index 33d0e8b472..a951b1258b 100644 --- a/vendor/github.com/StackExchange/wmi/wmi.go +++ b/vendor/github.com/StackExchange/wmi/wmi.go @@ -37,6 +37,7 @@ import ( "sync" "time" + "github.com/go-ole/go-ole" "github.com/go-ole/go-ole/oleutil" ) diff --git a/vendor/github.com/fatih/color/color.go b/vendor/github.com/fatih/color/color.go index f30e5f50b8..34cd8e4c8a 100644 --- a/vendor/github.com/fatih/color/color.go +++ b/vendor/github.com/fatih/color/color.go @@ -7,6 +7,9 @@ import ( "strconv" "strings" "sync" + + "github.com/mattn/go-colorable" + "github.com/mattn/go-isatty" ) var ( diff --git a/vendor/github.com/gizak/termui/events.go b/vendor/github.com/gizak/termui/events.go index f8cda39d74..16d9bd9cc3 100644 --- a/vendor/github.com/gizak/termui/events.go +++ b/vendor/github.com/gizak/termui/events.go @@ -9,6 +9,8 @@ import ( "strconv" "sync" "time" + + "github.com/nsf/termbox-go" ) type Event struct { diff --git a/vendor/github.com/gizak/termui/textbuilder.go b/vendor/github.com/gizak/termui/textbuilder.go index 3c1b681791..12e2055b50 100644 --- a/vendor/github.com/gizak/termui/textbuilder.go +++ b/vendor/github.com/gizak/termui/textbuilder.go @@ -7,6 +7,8 @@ package termui import ( "regexp" "strings" + + "github.com/mitchellh/go-wordwrap" ) // TextBuilder is a minimal interface to produce text []Cell using specific syntax (markdown). diff --git a/vendor/github.com/mattn/go-colorable/colorable_windows.go b/vendor/github.com/mattn/go-colorable/colorable_windows.go index 88d5b5611a..628ad904e5 100644 --- a/vendor/github.com/mattn/go-colorable/colorable_windows.go +++ b/vendor/github.com/mattn/go-colorable/colorable_windows.go @@ -9,6 +9,8 @@ import ( "strings" "syscall" "unsafe" + + "github.com/mattn/go-isatty" ) const ( diff --git a/vendor/github.com/nsf/termbox-go/api.go b/vendor/github.com/nsf/termbox-go/api.go index 717c4ad76c..b242ddcf3a 100644 --- a/vendor/github.com/nsf/termbox-go/api.go +++ b/vendor/github.com/nsf/termbox-go/api.go @@ -2,6 +2,7 @@ package termbox +import "github.com/mattn/go-runewidth" import "fmt" import "os" import "os/signal" diff --git a/vendor/github.com/nsf/termbox-go/termbox_windows.go b/vendor/github.com/nsf/termbox-go/termbox_windows.go index b2c184e696..f7dad7b8a5 100644 --- a/vendor/github.com/nsf/termbox-go/termbox_windows.go +++ b/vendor/github.com/nsf/termbox-go/termbox_windows.go @@ -3,6 +3,7 @@ package termbox import "syscall" import "unsafe" import "unicode/utf16" +import "github.com/mattn/go-runewidth" type ( wchar uint16 diff --git a/vendor/github.com/olekukonko/tablewriter/util.go b/vendor/github.com/olekukonko/tablewriter/util.go index a39721d8d5..2deefbc52a 100644 --- a/vendor/github.com/olekukonko/tablewriter/util.go +++ b/vendor/github.com/olekukonko/tablewriter/util.go @@ -11,6 +11,8 @@ import ( "math" "regexp" "strings" + + "github.com/mattn/go-runewidth" ) var ansi = regexp.MustCompile("\033\\[(?:[0-9]{1,3}(?:;[0-9]{1,3})*)?[m|K]") diff --git a/vendor/github.com/robertkrimen/otto/ast/comments.go b/vendor/github.com/robertkrimen/otto/ast/comments.go index 5c9485525e..ef2cc3d89b 100644 --- a/vendor/github.com/robertkrimen/otto/ast/comments.go +++ b/vendor/github.com/robertkrimen/otto/ast/comments.go @@ -2,7 +2,6 @@ package ast import ( "fmt" - "github.com/robertkrimen/otto/file" ) diff --git a/vendor/github.com/robertkrimen/otto/file/file.go b/vendor/github.com/robertkrimen/otto/file/file.go index 7f6bd17fd4..9093206e8e 100644 --- a/vendor/github.com/robertkrimen/otto/file/file.go +++ b/vendor/github.com/robertkrimen/otto/file/file.go @@ -5,6 +5,8 @@ package file import ( "fmt" "strings" + + "gopkg.in/sourcemap.v1" ) // Idx is a compact encoding of a source position within a file set. diff --git a/vendor/github.com/robertkrimen/otto/parser/parser.go b/vendor/github.com/robertkrimen/otto/parser/parser.go index f7fe0aaee3..75b7c500c4 100644 --- a/vendor/github.com/robertkrimen/otto/parser/parser.go +++ b/vendor/github.com/robertkrimen/otto/parser/parser.go @@ -43,6 +43,7 @@ import ( "github.com/robertkrimen/otto/ast" "github.com/robertkrimen/otto/file" "github.com/robertkrimen/otto/token" + "gopkg.in/sourcemap.v1" ) // A Mode value is a set of flags (or 0). They control optional parser functionality. diff --git a/vendor/github.com/robertkrimen/otto/result.go b/vendor/github.com/robertkrimen/otto/result.go index a8f9b3b185..63642e7d03 100644 --- a/vendor/github.com/robertkrimen/otto/result.go +++ b/vendor/github.com/robertkrimen/otto/result.go @@ -1,5 +1,7 @@ package otto +import () + type _resultKind int const ( diff --git a/vendor/github.com/stretchr/testify/require/require.go b/vendor/github.com/stretchr/testify/require/require.go index 50f8dc5444..2fe0557846 100644 --- a/vendor/github.com/stretchr/testify/require/require.go +++ b/vendor/github.com/stretchr/testify/require/require.go @@ -6,11 +6,10 @@ package require import ( + assert "github.com/stretchr/testify/assert" http "net/http" url "net/url" time "time" - - assert "github.com/stretchr/testify/assert" ) // Condition uses a Comparison to assert a complex condition. diff --git a/vendor/github.com/stretchr/testify/require/require_forward.go b/vendor/github.com/stretchr/testify/require/require_forward.go index cee247f19b..c59c3c7b47 100644 --- a/vendor/github.com/stretchr/testify/require/require_forward.go +++ b/vendor/github.com/stretchr/testify/require/require_forward.go @@ -6,11 +6,10 @@ package require import ( + assert "github.com/stretchr/testify/assert" http "net/http" url "net/url" time "time" - - assert "github.com/stretchr/testify/assert" ) // Condition uses a Comparison to assert a complex condition. diff --git a/vendor/github.com/syndtr/goleveldb/leveldb/storage.go b/vendor/github.com/syndtr/goleveldb/leveldb/storage.go index 6eebc25446..d45fb5dfeb 100644 --- a/vendor/github.com/syndtr/goleveldb/leveldb/storage.go +++ b/vendor/github.com/syndtr/goleveldb/leveldb/storage.go @@ -1,9 +1,8 @@ package leveldb import ( - "sync/atomic" - "github.com/syndtr/goleveldb/leveldb/storage" + "sync/atomic" ) type iStorage struct { diff --git a/vendor/golang.org/x/crypto/openpgp/armor/armor.go b/vendor/golang.org/x/crypto/openpgp/armor/armor.go index ab86e8c072..592d186436 100644 --- a/vendor/golang.org/x/crypto/openpgp/armor/armor.go +++ b/vendor/golang.org/x/crypto/openpgp/armor/armor.go @@ -10,9 +10,8 @@ import ( "bufio" "bytes" "encoding/base64" - "io" - "golang.org/x/crypto/openpgp/errors" + "io" ) // A Block represents an OpenPGP armored structure. diff --git a/vendor/golang.org/x/crypto/openpgp/packet/compressed.go b/vendor/golang.org/x/crypto/openpgp/packet/compressed.go index 6a719dfcea..e8f0b5caa7 100644 --- a/vendor/golang.org/x/crypto/openpgp/packet/compressed.go +++ b/vendor/golang.org/x/crypto/openpgp/packet/compressed.go @@ -8,10 +8,9 @@ import ( "compress/bzip2" "compress/flate" "compress/zlib" + "golang.org/x/crypto/openpgp/errors" "io" "strconv" - - "golang.org/x/crypto/openpgp/errors" ) // Compressed represents a compressed OpenPGP packet. The decompressed contents diff --git a/vendor/golang.org/x/crypto/openpgp/packet/one_pass_signature.go b/vendor/golang.org/x/crypto/openpgp/packet/one_pass_signature.go index eb6a31bc6a..1713503395 100644 --- a/vendor/golang.org/x/crypto/openpgp/packet/one_pass_signature.go +++ b/vendor/golang.org/x/crypto/openpgp/packet/one_pass_signature.go @@ -7,11 +7,10 @@ package packet import ( "crypto" "encoding/binary" - "io" - "strconv" - "golang.org/x/crypto/openpgp/errors" "golang.org/x/crypto/openpgp/s2k" + "io" + "strconv" ) // OnePassSignature represents a one-pass signature packet. See RFC 4880, diff --git a/vendor/golang.org/x/crypto/openpgp/packet/packet.go b/vendor/golang.org/x/crypto/openpgp/packet/packet.go index f5183d4e6b..3eded93f04 100644 --- a/vendor/golang.org/x/crypto/openpgp/packet/packet.go +++ b/vendor/golang.org/x/crypto/openpgp/packet/packet.go @@ -11,11 +11,10 @@ import ( "crypto/aes" "crypto/cipher" "crypto/des" - "io" - "math/big" - "golang.org/x/crypto/cast5" "golang.org/x/crypto/openpgp/errors" + "io" + "math/big" ) // readFull is the same as io.ReadFull except that reading zero bytes returns diff --git a/vendor/golang.org/x/crypto/openpgp/packet/reader.go b/vendor/golang.org/x/crypto/openpgp/packet/reader.go index 2a4ac85008..34bc7c613e 100644 --- a/vendor/golang.org/x/crypto/openpgp/packet/reader.go +++ b/vendor/golang.org/x/crypto/openpgp/packet/reader.go @@ -5,9 +5,8 @@ package packet import ( - "io" - "golang.org/x/crypto/openpgp/errors" + "io" ) // Reader reads packets from an io.Reader and allows packets to be 'unread' so diff --git a/vendor/golang.org/x/crypto/openpgp/packet/symmetrically_encrypted.go b/vendor/golang.org/x/crypto/openpgp/packet/symmetrically_encrypted.go index 789a27dca7..6126030eb9 100644 --- a/vendor/golang.org/x/crypto/openpgp/packet/symmetrically_encrypted.go +++ b/vendor/golang.org/x/crypto/openpgp/packet/symmetrically_encrypted.go @@ -8,11 +8,10 @@ import ( "crypto/cipher" "crypto/sha1" "crypto/subtle" + "golang.org/x/crypto/openpgp/errors" "hash" "io" "strconv" - - "golang.org/x/crypto/openpgp/errors" ) // SymmetricallyEncrypted represents a symmetrically encrypted byte string. The diff --git a/vendor/golang.org/x/crypto/ssh/terminal/util_solaris.go b/vendor/golang.org/x/crypto/ssh/terminal/util_solaris.go index 5dafc5a8af..a2e1b57dc1 100644 --- a/vendor/golang.org/x/crypto/ssh/terminal/util_solaris.go +++ b/vendor/golang.org/x/crypto/ssh/terminal/util_solaris.go @@ -7,10 +7,9 @@ package terminal // import "golang.org/x/crypto/ssh/terminal" import ( + "golang.org/x/sys/unix" "io" "syscall" - - "golang.org/x/sys/unix" ) // State contains the state of a terminal. diff --git a/vendor/gopkg.in/check.v1/benchmark.go b/vendor/gopkg.in/check.v1/benchmark.go index b2d351948d..46ea9dc6da 100644 --- a/vendor/gopkg.in/check.v1/benchmark.go +++ b/vendor/gopkg.in/check.v1/benchmark.go @@ -1,9 +1,9 @@ // Copyright (c) 2012 The Go Authors. All rights reserved. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: -// +// // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above @@ -13,7 +13,7 @@ // * Neither the name of Google Inc. nor the names of its // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. -// +// // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR diff --git a/whisper/shhclient/client.go b/whisper/shhclient/client.go index c3ce44f25b..bbe694baaa 100644 --- a/whisper/shhclient/client.go +++ b/whisper/shhclient/client.go @@ -19,6 +19,7 @@ package shhclient import ( "context" + "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/rpc" whisper "github.com/ethereum/go-ethereum/whisper/whisperv6"