From 95297c608c59fc66bb965c9231a0685eb3ddeac1 Mon Sep 17 00:00:00 2001 From: Alex Dadgar Date: Tue, 15 Jan 2019 11:46:12 -0800 Subject: [PATCH] goimports --- api/api.go | 2 +- client/allocdir/alloc_dir.go | 2 +- client/allocwatcher/alloc_watcher.go | 2 +- client/client_test.go | 4 ++-- client/config/testing.go | 2 +- client/fingerprint/env_aws.go | 2 +- client/fingerprint/env_gce.go | 2 +- client/vaultclient/vaultclient.go | 2 +- command/agent/bindata_assetfs.go | 5 ----- command/agent/command.go | 12 ++++++------ command/agent/syslog.go | 2 +- command/agent/syslog_test.go | 2 +- command/agent/testagent.go | 2 +- drivers/java/handle.go | 4 ++-- drivers/qemu/handle.go | 4 ++-- drivers/shared/executor/executor_plugin.go | 2 +- helper/fields/data.go | 2 +- jobspec/parse.go | 2 +- nomad/alloc_endpoint.go | 4 ++-- nomad/alloc_endpoint_test.go | 2 +- nomad/autopilot.go | 2 +- nomad/eval_endpoint.go | 4 ++-- nomad/eval_endpoint_test.go | 2 +- nomad/fsm.go | 2 +- nomad/heartbeat.go | 2 +- nomad/heartbeat_test.go | 2 +- nomad/job_endpoint.go | 4 ++-- nomad/leader.go | 4 ++-- nomad/mock/acl.go | 3 ++- nomad/node_endpoint.go | 6 +++--- nomad/node_endpoint_test.go | 2 +- nomad/operator_endpoint_test.go | 2 +- nomad/periodic_endpoint.go | 2 +- nomad/plan_apply.go | 4 ++-- nomad/plan_endpoint.go | 2 +- nomad/plan_endpoint_test.go | 2 +- nomad/plan_queue.go | 2 +- nomad/regions_endpoint_test.go | 2 +- nomad/state/autopilot.go | 2 +- nomad/state/schema.go | 2 +- nomad/state/schema_test.go | 2 +- nomad/state/state_store.go | 2 +- nomad/state/testing.go | 3 ++- nomad/state/testing_oss.go | 2 +- nomad/status_endpoint_test.go | 2 +- nomad/structs/structs_test.go | 2 +- nomad/system_endpoint_test.go | 2 +- nomad/testing.go | 3 ++- nomad/vault.go | 2 +- nomad/worker.go | 2 +- plugins/drivers/testutils/testing.go | 3 ++- pluginutils/catalog/testing.go | 3 ++- pluginutils/loader/loader.go | 2 +- scheduler/context.go | 2 +- scheduler/feasible.go | 2 +- scheduler/generic_sched.go | 2 +- scheduler/scheduler.go | 2 +- scheduler/testing.go | 3 ++- testutil/wait.go | 2 +- 59 files changed, 79 insertions(+), 78 deletions(-) diff --git a/api/api.go b/api/api.go index 1ea032ae5c3..3a346267b27 100644 --- a/api/api.go +++ b/api/api.go @@ -15,7 +15,7 @@ import ( "strings" "time" - "github.com/hashicorp/go-cleanhttp" + cleanhttp "github.com/hashicorp/go-cleanhttp" rootcerts "github.com/hashicorp/go-rootcerts" ) diff --git a/client/allocdir/alloc_dir.go b/client/allocdir/alloc_dir.go index 793c5c81d1e..8c3b2ce64ff 100644 --- a/client/allocdir/alloc_dir.go +++ b/client/allocdir/alloc_dir.go @@ -12,7 +12,7 @@ import ( "time" hclog "github.com/hashicorp/go-hclog" - "github.com/hashicorp/go-multierror" + multierror "github.com/hashicorp/go-multierror" cstructs "github.com/hashicorp/nomad/client/structs" "github.com/hashicorp/nomad/nomad/structs" "github.com/hpcloud/tail/watch" diff --git a/client/allocwatcher/alloc_watcher.go b/client/allocwatcher/alloc_watcher.go index 192a9a0f0d6..35d3954022a 100644 --- a/client/allocwatcher/alloc_watcher.go +++ b/client/allocwatcher/alloc_watcher.go @@ -12,7 +12,7 @@ import ( "time" "github.com/hashicorp/consul/lib" - "github.com/hashicorp/go-hclog" + hclog "github.com/hashicorp/go-hclog" nomadapi "github.com/hashicorp/nomad/api" "github.com/hashicorp/nomad/client/allocdir" "github.com/hashicorp/nomad/client/config" diff --git a/client/client_test.go b/client/client_test.go index 7c3f3f40846..e622005f695 100644 --- a/client/client_test.go +++ b/client/client_test.go @@ -9,7 +9,7 @@ import ( "testing" "time" - "github.com/hashicorp/go-memdb" + memdb "github.com/hashicorp/go-memdb" "github.com/hashicorp/nomad/client/config" consulApi "github.com/hashicorp/nomad/client/consul" "github.com/hashicorp/nomad/client/fingerprint" @@ -26,7 +26,7 @@ import ( "github.com/hashicorp/nomad/testutil" "github.com/stretchr/testify/assert" - "github.com/hashicorp/go-hclog" + hclog "github.com/hashicorp/go-hclog" cstate "github.com/hashicorp/nomad/client/state" ctestutil "github.com/hashicorp/nomad/client/testutil" "github.com/stretchr/testify/require" diff --git a/client/config/testing.go b/client/config/testing.go index 1097e5bcde4..8966ac831c6 100644 --- a/client/config/testing.go +++ b/client/config/testing.go @@ -8,7 +8,7 @@ import ( "github.com/hashicorp/nomad/helper" "github.com/hashicorp/nomad/helper/testlog" "github.com/hashicorp/nomad/nomad/mock" - "github.com/mitchellh/go-testing-interface" + testing "github.com/mitchellh/go-testing-interface" ) // TestClientConfig returns a default client configuration for test clients and diff --git a/client/fingerprint/env_aws.go b/client/fingerprint/env_aws.go index ba7d2cbf8ef..28bc7e9f597 100644 --- a/client/fingerprint/env_aws.go +++ b/client/fingerprint/env_aws.go @@ -12,7 +12,7 @@ import ( log "github.com/hashicorp/go-hclog" - "github.com/hashicorp/go-cleanhttp" + cleanhttp "github.com/hashicorp/go-cleanhttp" "github.com/hashicorp/nomad/nomad/structs" ) diff --git a/client/fingerprint/env_gce.go b/client/fingerprint/env_gce.go index 4d0f7f13d02..a197f3f5a25 100644 --- a/client/fingerprint/env_gce.go +++ b/client/fingerprint/env_gce.go @@ -12,9 +12,9 @@ import ( "strings" "time" + cleanhttp "github.com/hashicorp/go-cleanhttp" log "github.com/hashicorp/go-hclog" - "github.com/hashicorp/go-cleanhttp" "github.com/hashicorp/nomad/helper/useragent" "github.com/hashicorp/nomad/nomad/structs" ) diff --git a/client/vaultclient/vaultclient.go b/client/vaultclient/vaultclient.go index 8d9dff28da2..2adcec1052f 100644 --- a/client/vaultclient/vaultclient.go +++ b/client/vaultclient/vaultclient.go @@ -9,7 +9,7 @@ import ( "sync" "time" - "github.com/armon/go-metrics" + metrics "github.com/armon/go-metrics" hclog "github.com/hashicorp/go-hclog" "github.com/hashicorp/nomad/nomad/structs" "github.com/hashicorp/nomad/nomad/structs/config" diff --git a/command/agent/bindata_assetfs.go b/command/agent/bindata_assetfs.go index 6c0c1c63c1b..4ef264459f0 100644 --- a/command/agent/bindata_assetfs.go +++ b/command/agent/bindata_assetfs.go @@ -26,13 +26,8 @@ import ( "compress/gzip" "fmt" "io" - "io/ioutil" "os" - "path/filepath" - "strings" "time" - - "github.com/elazarl/go-bindata-assetfs" ) func bindataRead(data []byte, name string) ([]byte, error) { diff --git a/command/agent/command.go b/command/agent/command.go index 39998a7eaf5..47da7e272b9 100644 --- a/command/agent/command.go +++ b/command/agent/command.go @@ -15,18 +15,18 @@ import ( "syscall" "time" - "github.com/armon/go-metrics" + metrics "github.com/armon/go-metrics" "github.com/armon/go-metrics/circonus" "github.com/armon/go-metrics/datadog" "github.com/armon/go-metrics/prometheus" "github.com/hashicorp/consul/lib" - "github.com/hashicorp/go-checkpoint" - "github.com/hashicorp/go-discover" - "github.com/hashicorp/go-syslog" + checkpoint "github.com/hashicorp/go-checkpoint" + discover "github.com/hashicorp/go-discover" + gsyslog "github.com/hashicorp/go-syslog" "github.com/hashicorp/logutils" "github.com/hashicorp/nomad/helper" - "github.com/hashicorp/nomad/helper/flag-helpers" - "github.com/hashicorp/nomad/helper/gated-writer" + flaghelper "github.com/hashicorp/nomad/helper/flag-helpers" + gatedwriter "github.com/hashicorp/nomad/helper/gated-writer" "github.com/hashicorp/nomad/nomad/structs/config" "github.com/hashicorp/nomad/version" "github.com/mitchellh/cli" diff --git a/command/agent/syslog.go b/command/agent/syslog.go index 7acc5679f8f..90b44742f8b 100644 --- a/command/agent/syslog.go +++ b/command/agent/syslog.go @@ -3,7 +3,7 @@ package agent import ( "bytes" - "github.com/hashicorp/go-syslog" + gsyslog "github.com/hashicorp/go-syslog" "github.com/hashicorp/logutils" ) diff --git a/command/agent/syslog_test.go b/command/agent/syslog_test.go index 39ee0eee46f..37c4e6fff25 100644 --- a/command/agent/syslog_test.go +++ b/command/agent/syslog_test.go @@ -5,7 +5,7 @@ import ( "runtime" "testing" - "github.com/hashicorp/go-syslog" + gsyslog "github.com/hashicorp/go-syslog" "github.com/hashicorp/logutils" ) diff --git a/command/agent/testagent.go b/command/agent/testagent.go index 87219fceec7..b8d5f55a7af 100644 --- a/command/agent/testagent.go +++ b/command/agent/testagent.go @@ -13,7 +13,7 @@ import ( "strings" "time" - "github.com/mitchellh/go-testing-interface" + testing "github.com/mitchellh/go-testing-interface" metrics "github.com/armon/go-metrics" "github.com/hashicorp/consul/lib/freeport" diff --git a/drivers/java/handle.go b/drivers/java/handle.go index 8ef2dc6a06a..e2d67736551 100644 --- a/drivers/java/handle.go +++ b/drivers/java/handle.go @@ -6,8 +6,8 @@ import ( "sync" "time" - "github.com/hashicorp/go-hclog" - "github.com/hashicorp/go-plugin" + hclog "github.com/hashicorp/go-hclog" + plugin "github.com/hashicorp/go-plugin" "github.com/hashicorp/nomad/drivers/shared/executor" "github.com/hashicorp/nomad/plugins/drivers" ) diff --git a/drivers/qemu/handle.go b/drivers/qemu/handle.go index 63223f1c2a9..ae1619183da 100644 --- a/drivers/qemu/handle.go +++ b/drivers/qemu/handle.go @@ -6,8 +6,8 @@ import ( "sync" "time" - "github.com/hashicorp/go-hclog" - "github.com/hashicorp/go-plugin" + hclog "github.com/hashicorp/go-hclog" + plugin "github.com/hashicorp/go-plugin" "github.com/hashicorp/nomad/drivers/shared/executor" "github.com/hashicorp/nomad/plugins/drivers" ) diff --git a/drivers/shared/executor/executor_plugin.go b/drivers/shared/executor/executor_plugin.go index f9e661ed6f4..6eb7b356469 100644 --- a/drivers/shared/executor/executor_plugin.go +++ b/drivers/shared/executor/executor_plugin.go @@ -4,7 +4,7 @@ import ( "context" hclog "github.com/hashicorp/go-hclog" - "github.com/hashicorp/go-plugin" + plugin "github.com/hashicorp/go-plugin" "github.com/hashicorp/nomad/drivers/shared/executor/proto" "google.golang.org/grpc" ) diff --git a/helper/fields/data.go b/helper/fields/data.go index fb22bbc5952..8423fb67f30 100644 --- a/helper/fields/data.go +++ b/helper/fields/data.go @@ -3,7 +3,7 @@ package fields import ( "fmt" - "github.com/hashicorp/go-multierror" + multierror "github.com/hashicorp/go-multierror" "github.com/mitchellh/mapstructure" ) diff --git a/jobspec/parse.go b/jobspec/parse.go index c88df2d877d..f1914a586e2 100644 --- a/jobspec/parse.go +++ b/jobspec/parse.go @@ -11,7 +11,7 @@ import ( "strings" "time" - "github.com/hashicorp/go-multierror" + multierror "github.com/hashicorp/go-multierror" "github.com/hashicorp/hcl" "github.com/hashicorp/hcl/hcl/ast" "github.com/hashicorp/nomad/api" diff --git a/nomad/alloc_endpoint.go b/nomad/alloc_endpoint.go index dd1dfcc9611..643fa2bf878 100644 --- a/nomad/alloc_endpoint.go +++ b/nomad/alloc_endpoint.go @@ -4,11 +4,11 @@ import ( "fmt" "time" + metrics "github.com/armon/go-metrics" log "github.com/hashicorp/go-hclog" + memdb "github.com/hashicorp/go-memdb" multierror "github.com/hashicorp/go-multierror" - "github.com/armon/go-metrics" - "github.com/hashicorp/go-memdb" "github.com/hashicorp/nomad/acl" "github.com/hashicorp/nomad/nomad/state" "github.com/hashicorp/nomad/nomad/structs" diff --git a/nomad/alloc_endpoint_test.go b/nomad/alloc_endpoint_test.go index 5d309d7c3b9..b34dc7345a7 100644 --- a/nomad/alloc_endpoint_test.go +++ b/nomad/alloc_endpoint_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - "github.com/hashicorp/net-rpc-msgpackrpc" + msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" "github.com/hashicorp/nomad/acl" "github.com/hashicorp/nomad/helper" "github.com/hashicorp/nomad/helper/uuid" diff --git a/nomad/autopilot.go b/nomad/autopilot.go index 399b3458fe8..2cb5e2505fe 100644 --- a/nomad/autopilot.go +++ b/nomad/autopilot.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/armon/go-metrics" + metrics "github.com/armon/go-metrics" "github.com/hashicorp/consul/agent/consul/autopilot" "github.com/hashicorp/raft" "github.com/hashicorp/serf/serf" diff --git a/nomad/eval_endpoint.go b/nomad/eval_endpoint.go index da7520e7125..ff30eaba836 100644 --- a/nomad/eval_endpoint.go +++ b/nomad/eval_endpoint.go @@ -4,11 +4,11 @@ import ( "fmt" "time" + metrics "github.com/armon/go-metrics" log "github.com/hashicorp/go-hclog" + memdb "github.com/hashicorp/go-memdb" multierror "github.com/hashicorp/go-multierror" - "github.com/armon/go-metrics" - "github.com/hashicorp/go-memdb" "github.com/hashicorp/nomad/acl" "github.com/hashicorp/nomad/nomad/state" "github.com/hashicorp/nomad/nomad/structs" diff --git a/nomad/eval_endpoint_test.go b/nomad/eval_endpoint_test.go index f5e144fa749..43662ed8c73 100644 --- a/nomad/eval_endpoint_test.go +++ b/nomad/eval_endpoint_test.go @@ -8,7 +8,7 @@ import ( "time" memdb "github.com/hashicorp/go-memdb" - "github.com/hashicorp/net-rpc-msgpackrpc" + msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" "github.com/hashicorp/nomad/acl" "github.com/hashicorp/nomad/helper/uuid" "github.com/hashicorp/nomad/nomad/mock" diff --git a/nomad/fsm.go b/nomad/fsm.go index c78b1fb51b5..3c91b8f5c69 100644 --- a/nomad/fsm.go +++ b/nomad/fsm.go @@ -7,7 +7,7 @@ import ( "sync" "time" - "github.com/armon/go-metrics" + metrics "github.com/armon/go-metrics" log "github.com/hashicorp/go-hclog" memdb "github.com/hashicorp/go-memdb" "github.com/hashicorp/nomad/helper/uuid" diff --git a/nomad/heartbeat.go b/nomad/heartbeat.go index fe3b829ffb8..579d8d65245 100644 --- a/nomad/heartbeat.go +++ b/nomad/heartbeat.go @@ -5,10 +5,10 @@ import ( "sync" "time" + metrics "github.com/armon/go-metrics" log "github.com/hashicorp/go-hclog" memdb "github.com/hashicorp/go-memdb" - "github.com/armon/go-metrics" "github.com/hashicorp/consul/lib" "github.com/hashicorp/nomad/nomad/structs" ) diff --git a/nomad/heartbeat_test.go b/nomad/heartbeat_test.go index 72a21377ca3..0e9e56ffb25 100644 --- a/nomad/heartbeat_test.go +++ b/nomad/heartbeat_test.go @@ -6,7 +6,7 @@ import ( "time" memdb "github.com/hashicorp/go-memdb" - "github.com/hashicorp/net-rpc-msgpackrpc" + msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" "github.com/hashicorp/nomad/nomad/mock" "github.com/hashicorp/nomad/nomad/structs" "github.com/hashicorp/nomad/testutil" diff --git a/nomad/job_endpoint.go b/nomad/job_endpoint.go index 94991c3f34b..132c14f58ce 100644 --- a/nomad/job_endpoint.go +++ b/nomad/job_endpoint.go @@ -7,13 +7,13 @@ import ( "strings" "time" + metrics "github.com/armon/go-metrics" log "github.com/hashicorp/go-hclog" memdb "github.com/hashicorp/go-memdb" + multierror "github.com/hashicorp/go-multierror" - "github.com/armon/go-metrics" "github.com/golang/snappy" "github.com/hashicorp/consul/lib" - "github.com/hashicorp/go-multierror" "github.com/hashicorp/nomad/acl" "github.com/hashicorp/nomad/helper" "github.com/hashicorp/nomad/helper/uuid" diff --git a/nomad/leader.go b/nomad/leader.go index f9aa35208dd..55bd2857e83 100644 --- a/nomad/leader.go +++ b/nomad/leader.go @@ -13,10 +13,10 @@ import ( "strings" - "github.com/armon/go-metrics" + metrics "github.com/armon/go-metrics" log "github.com/hashicorp/go-hclog" memdb "github.com/hashicorp/go-memdb" - "github.com/hashicorp/go-version" + version "github.com/hashicorp/go-version" "github.com/hashicorp/nomad/helper/uuid" "github.com/hashicorp/nomad/nomad/state" "github.com/hashicorp/nomad/nomad/structs" diff --git a/nomad/mock/acl.go b/nomad/mock/acl.go index 01b65600bc5..3166db8cbb1 100644 --- a/nomad/mock/acl.go +++ b/nomad/mock/acl.go @@ -5,8 +5,9 @@ import ( "strconv" "strings" + testing "github.com/mitchellh/go-testing-interface" + "github.com/hashicorp/nomad/nomad/structs" - "github.com/mitchellh/go-testing-interface" "github.com/stretchr/testify/assert" ) diff --git a/nomad/node_endpoint.go b/nomad/node_endpoint.go index 84f51ee0831..5e57406f8a0 100644 --- a/nomad/node_endpoint.go +++ b/nomad/node_endpoint.go @@ -9,12 +9,12 @@ import ( "golang.org/x/sync/errgroup" + metrics "github.com/armon/go-metrics" log "github.com/hashicorp/go-hclog" + memdb "github.com/hashicorp/go-memdb" + multierror "github.com/hashicorp/go-multierror" vapi "github.com/hashicorp/vault/api" - "github.com/armon/go-metrics" - "github.com/hashicorp/go-memdb" - "github.com/hashicorp/go-multierror" "github.com/hashicorp/nomad/acl" "github.com/hashicorp/nomad/helper/uuid" "github.com/hashicorp/nomad/nomad/state" diff --git a/nomad/node_endpoint_test.go b/nomad/node_endpoint_test.go index 35eea7d854b..70542392bdc 100644 --- a/nomad/node_endpoint_test.go +++ b/nomad/node_endpoint_test.go @@ -9,7 +9,7 @@ import ( "time" memdb "github.com/hashicorp/go-memdb" - "github.com/hashicorp/net-rpc-msgpackrpc" + msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" "github.com/hashicorp/nomad/acl" "github.com/hashicorp/nomad/helper/uuid" "github.com/hashicorp/nomad/nomad/mock" diff --git a/nomad/operator_endpoint_test.go b/nomad/operator_endpoint_test.go index 957ce9e846c..4f9d853452f 100644 --- a/nomad/operator_endpoint_test.go +++ b/nomad/operator_endpoint_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/hashicorp/consul/lib/freeport" - "github.com/hashicorp/net-rpc-msgpackrpc" + msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" "github.com/hashicorp/nomad/acl" "github.com/hashicorp/nomad/nomad/mock" "github.com/hashicorp/nomad/nomad/structs" diff --git a/nomad/periodic_endpoint.go b/nomad/periodic_endpoint.go index ecac2565421..4864fdd6832 100644 --- a/nomad/periodic_endpoint.go +++ b/nomad/periodic_endpoint.go @@ -4,10 +4,10 @@ import ( "fmt" "time" + metrics "github.com/armon/go-metrics" log "github.com/hashicorp/go-hclog" memdb "github.com/hashicorp/go-memdb" - "github.com/armon/go-metrics" "github.com/hashicorp/nomad/acl" "github.com/hashicorp/nomad/nomad/structs" ) diff --git a/nomad/plan_apply.go b/nomad/plan_apply.go index 28a2b14db09..f40690d00f2 100644 --- a/nomad/plan_apply.go +++ b/nomad/plan_apply.go @@ -5,10 +5,10 @@ import ( "runtime" "time" - "github.com/armon/go-metrics" + metrics "github.com/armon/go-metrics" log "github.com/hashicorp/go-hclog" memdb "github.com/hashicorp/go-memdb" - "github.com/hashicorp/go-multierror" + multierror "github.com/hashicorp/go-multierror" "github.com/hashicorp/nomad/helper/uuid" "github.com/hashicorp/nomad/nomad/state" "github.com/hashicorp/nomad/nomad/structs" diff --git a/nomad/plan_endpoint.go b/nomad/plan_endpoint.go index bacea404d0a..bf2c461fdff 100644 --- a/nomad/plan_endpoint.go +++ b/nomad/plan_endpoint.go @@ -3,9 +3,9 @@ package nomad import ( "time" + metrics "github.com/armon/go-metrics" log "github.com/hashicorp/go-hclog" - "github.com/armon/go-metrics" "github.com/hashicorp/nomad/nomad/structs" ) diff --git a/nomad/plan_endpoint_test.go b/nomad/plan_endpoint_test.go index ed71ec4171e..7b9e1c38ca5 100644 --- a/nomad/plan_endpoint_test.go +++ b/nomad/plan_endpoint_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - "github.com/hashicorp/net-rpc-msgpackrpc" + msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" "github.com/hashicorp/nomad/nomad/mock" "github.com/hashicorp/nomad/nomad/structs" "github.com/hashicorp/nomad/testutil" diff --git a/nomad/plan_queue.go b/nomad/plan_queue.go index 4a7c93e0b0f..db031a3e2f9 100644 --- a/nomad/plan_queue.go +++ b/nomad/plan_queue.go @@ -6,7 +6,7 @@ import ( "sync" "time" - "github.com/armon/go-metrics" + metrics "github.com/armon/go-metrics" "github.com/hashicorp/nomad/nomad/structs" ) diff --git a/nomad/regions_endpoint_test.go b/nomad/regions_endpoint_test.go index 8bd79d0bb5f..bf6d0e203fe 100644 --- a/nomad/regions_endpoint_test.go +++ b/nomad/regions_endpoint_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/hashicorp/net-rpc-msgpackrpc" + msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" "github.com/hashicorp/nomad/nomad/structs" "github.com/hashicorp/nomad/testutil" ) diff --git a/nomad/state/autopilot.go b/nomad/state/autopilot.go index 83613817d67..79447b2ce59 100644 --- a/nomad/state/autopilot.go +++ b/nomad/state/autopilot.go @@ -3,7 +3,7 @@ package state import ( "fmt" - "github.com/hashicorp/go-memdb" + memdb "github.com/hashicorp/go-memdb" "github.com/hashicorp/nomad/nomad/structs" ) diff --git a/nomad/state/schema.go b/nomad/state/schema.go index 53df292dc22..dc262977e8c 100644 --- a/nomad/state/schema.go +++ b/nomad/state/schema.go @@ -4,7 +4,7 @@ import ( "fmt" "sync" - "github.com/hashicorp/go-memdb" + memdb "github.com/hashicorp/go-memdb" "github.com/hashicorp/nomad/nomad/structs" ) diff --git a/nomad/state/schema_test.go b/nomad/state/schema_test.go index 93c6d5872c7..1e1a17d8220 100644 --- a/nomad/state/schema_test.go +++ b/nomad/state/schema_test.go @@ -3,7 +3,7 @@ package state import ( "testing" - "github.com/hashicorp/go-memdb" + memdb "github.com/hashicorp/go-memdb" ) func TestStateStoreSchema(t *testing.T) { diff --git a/nomad/state/state_store.go b/nomad/state/state_store.go index 49626547bcd..84201cbaaf0 100644 --- a/nomad/state/state_store.go +++ b/nomad/state/state_store.go @@ -9,7 +9,7 @@ import ( "reflect" log "github.com/hashicorp/go-hclog" - "github.com/hashicorp/go-memdb" + memdb "github.com/hashicorp/go-memdb" multierror "github.com/hashicorp/go-multierror" "github.com/hashicorp/nomad/helper" "github.com/hashicorp/nomad/nomad/structs" diff --git a/nomad/state/testing.go b/nomad/state/testing.go index 5bf2350166a..bacb0470aae 100644 --- a/nomad/state/testing.go +++ b/nomad/state/testing.go @@ -1,8 +1,9 @@ package state import ( + testing "github.com/mitchellh/go-testing-interface" + "github.com/hashicorp/nomad/helper/testlog" - "github.com/mitchellh/go-testing-interface" ) func TestStateStore(t testing.T) *StateStore { diff --git a/nomad/state/testing_oss.go b/nomad/state/testing_oss.go index ff9c3b23f06..9c858d07e7e 100644 --- a/nomad/state/testing_oss.go +++ b/nomad/state/testing_oss.go @@ -3,7 +3,7 @@ package state import ( - "github.com/mitchellh/go-testing-interface" + testing "github.com/mitchellh/go-testing-interface" ) func TestInitState(t testing.T, state *StateStore) {} diff --git a/nomad/status_endpoint_test.go b/nomad/status_endpoint_test.go index eb968b673e9..7f345612463 100644 --- a/nomad/status_endpoint_test.go +++ b/nomad/status_endpoint_test.go @@ -3,7 +3,7 @@ package nomad import ( "testing" - "github.com/hashicorp/net-rpc-msgpackrpc" + msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" "github.com/hashicorp/nomad/acl" "github.com/hashicorp/nomad/helper/uuid" "github.com/hashicorp/nomad/nomad/mock" diff --git a/nomad/structs/structs_test.go b/nomad/structs/structs_test.go index 2669f9399d4..9d250766903 100644 --- a/nomad/structs/structs_test.go +++ b/nomad/structs/structs_test.go @@ -9,7 +9,7 @@ import ( "time" "github.com/hashicorp/consul/api" - "github.com/hashicorp/go-multierror" + multierror "github.com/hashicorp/go-multierror" "github.com/hashicorp/nomad/helper/uuid" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/nomad/system_endpoint_test.go b/nomad/system_endpoint_test.go index ba9353e1e29..4717dd537de 100644 --- a/nomad/system_endpoint_test.go +++ b/nomad/system_endpoint_test.go @@ -6,7 +6,7 @@ import ( "testing" memdb "github.com/hashicorp/go-memdb" - "github.com/hashicorp/net-rpc-msgpackrpc" + msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" "github.com/hashicorp/nomad/acl" "github.com/hashicorp/nomad/nomad/mock" "github.com/hashicorp/nomad/nomad/structs" diff --git a/nomad/testing.go b/nomad/testing.go index 795f7725e58..374fc4790a6 100644 --- a/nomad/testing.go +++ b/nomad/testing.go @@ -7,6 +7,8 @@ import ( "sync/atomic" "time" + testing "github.com/mitchellh/go-testing-interface" + "github.com/hashicorp/consul/lib/freeport" "github.com/hashicorp/nomad/command/agent/consul" "github.com/hashicorp/nomad/helper/testlog" @@ -14,7 +16,6 @@ import ( "github.com/hashicorp/nomad/nomad/structs" "github.com/hashicorp/nomad/pluginutils/catalog" "github.com/hashicorp/nomad/pluginutils/singleton" - "github.com/mitchellh/go-testing-interface" ) var ( diff --git a/nomad/vault.go b/nomad/vault.go index ebf4bced284..e07142825d8 100644 --- a/nomad/vault.go +++ b/nomad/vault.go @@ -10,7 +10,7 @@ import ( "sync/atomic" "time" - "gopkg.in/tomb.v2" + tomb "gopkg.in/tomb.v2" metrics "github.com/armon/go-metrics" log "github.com/hashicorp/go-hclog" diff --git a/nomad/worker.go b/nomad/worker.go index 19442f47cce..f0aefb62d54 100644 --- a/nomad/worker.go +++ b/nomad/worker.go @@ -6,7 +6,7 @@ import ( "sync" "time" - "github.com/armon/go-metrics" + metrics "github.com/armon/go-metrics" log "github.com/hashicorp/go-hclog" memdb "github.com/hashicorp/go-memdb" "github.com/hashicorp/nomad/nomad/structs" diff --git a/plugins/drivers/testutils/testing.go b/plugins/drivers/testutils/testing.go index a9756be2d17..c363c593fb8 100644 --- a/plugins/drivers/testutils/testing.go +++ b/plugins/drivers/testutils/testing.go @@ -9,6 +9,8 @@ import ( "strings" "time" + testing "github.com/mitchellh/go-testing-interface" + hclog "github.com/hashicorp/go-hclog" plugin "github.com/hashicorp/go-plugin" "github.com/hashicorp/nomad/client/allocdir" @@ -22,7 +24,6 @@ import ( "github.com/hashicorp/nomad/plugins/base" "github.com/hashicorp/nomad/plugins/drivers" "github.com/hashicorp/nomad/plugins/shared/hclspec" - "github.com/mitchellh/go-testing-interface" "github.com/stretchr/testify/require" ) diff --git a/pluginutils/catalog/testing.go b/pluginutils/catalog/testing.go index 95332ca9202..0c98d301e37 100644 --- a/pluginutils/catalog/testing.go +++ b/pluginutils/catalog/testing.go @@ -1,10 +1,11 @@ package catalog import ( + testing "github.com/mitchellh/go-testing-interface" + "github.com/hashicorp/nomad/helper/testlog" "github.com/hashicorp/nomad/nomad/structs/config" "github.com/hashicorp/nomad/pluginutils/loader" - "github.com/mitchellh/go-testing-interface" ) // TestPluginLoader returns a plugin loader populated only with internal plugins diff --git a/pluginutils/loader/loader.go b/pluginutils/loader/loader.go index b07904832fe..ece1231d0d7 100644 --- a/pluginutils/loader/loader.go +++ b/pluginutils/loader/loader.go @@ -6,7 +6,7 @@ import ( log "github.com/hashicorp/go-hclog" plugin "github.com/hashicorp/go-plugin" - "github.com/hashicorp/go-version" + version "github.com/hashicorp/go-version" "github.com/hashicorp/nomad/nomad/structs/config" "github.com/hashicorp/nomad/plugins" "github.com/hashicorp/nomad/plugins/base" diff --git a/scheduler/context.go b/scheduler/context.go index 0d83deab8ce..07cf9fdd6f3 100644 --- a/scheduler/context.go +++ b/scheduler/context.go @@ -5,7 +5,7 @@ import ( log "github.com/hashicorp/go-hclog" memdb "github.com/hashicorp/go-memdb" - "github.com/hashicorp/go-version" + version "github.com/hashicorp/go-version" "github.com/hashicorp/nomad/nomad/structs" ) diff --git a/scheduler/feasible.go b/scheduler/feasible.go index ce0f6d1ca97..856b199b122 100644 --- a/scheduler/feasible.go +++ b/scheduler/feasible.go @@ -7,7 +7,7 @@ import ( "strconv" "strings" - "github.com/hashicorp/go-version" + version "github.com/hashicorp/go-version" "github.com/hashicorp/nomad/nomad/structs" psstructs "github.com/hashicorp/nomad/plugins/shared/structs" ) diff --git a/scheduler/generic_sched.go b/scheduler/generic_sched.go index 93f982ede7d..e4b27b64e9e 100644 --- a/scheduler/generic_sched.go +++ b/scheduler/generic_sched.go @@ -6,7 +6,7 @@ import ( log "github.com/hashicorp/go-hclog" memdb "github.com/hashicorp/go-memdb" - "github.com/hashicorp/go-multierror" + multierror "github.com/hashicorp/go-multierror" "github.com/hashicorp/nomad/helper/uuid" "github.com/hashicorp/nomad/nomad/structs" ) diff --git a/scheduler/scheduler.go b/scheduler/scheduler.go index bd921a788d1..639b2b8cf28 100644 --- a/scheduler/scheduler.go +++ b/scheduler/scheduler.go @@ -5,7 +5,7 @@ import ( log "github.com/hashicorp/go-hclog" - "github.com/hashicorp/go-memdb" + memdb "github.com/hashicorp/go-memdb" "github.com/hashicorp/nomad/nomad/state" "github.com/hashicorp/nomad/nomad/structs" ) diff --git a/scheduler/testing.go b/scheduler/testing.go index 31fc9ab91af..f0501010246 100644 --- a/scheduler/testing.go +++ b/scheduler/testing.go @@ -5,11 +5,12 @@ import ( "sync" "time" + testing "github.com/mitchellh/go-testing-interface" + memdb "github.com/hashicorp/go-memdb" "github.com/hashicorp/nomad/helper/testlog" "github.com/hashicorp/nomad/nomad/state" "github.com/hashicorp/nomad/nomad/structs" - "github.com/mitchellh/go-testing-interface" ) // RejectPlan is used to always reject the entire plan and force a state refresh diff --git a/testutil/wait.go b/testutil/wait.go index 7c947a3c60c..c5bbf439c65 100644 --- a/testutil/wait.go +++ b/testutil/wait.go @@ -6,7 +6,7 @@ import ( "time" "github.com/hashicorp/nomad/nomad/structs" - "github.com/mitchellh/go-testing-interface" + testing "github.com/mitchellh/go-testing-interface" "github.com/stretchr/testify/require" )