From 09679d29ad0c1aab1365583af1aa7d6b116f7e44 Mon Sep 17 00:00:00 2001 From: Piotr Tabor Date: Tue, 20 Oct 2020 11:04:59 +0200 Subject: [PATCH] etcdctl: Rename of imports after making etcdctl a module. ``` find -name '*.go' | xargs sed -i --follow-symlinks 's|etcd/v3/etcdctl|etcd/etcdctl/v3|g' ``` --- etcdctl/ctlv2/ctl.go | 2 +- etcdctl/ctlv3/command/printer.go | 2 +- etcdctl/ctlv3/command/printer_fields.go | 2 +- etcdctl/ctlv3/command/printer_json.go | 2 +- etcdctl/ctlv3/command/printer_simple.go | 2 +- etcdctl/ctlv3/command/printer_table.go | 2 +- etcdctl/ctlv3/command/snapshot_command.go | 2 +- etcdctl/ctlv3/ctl.go | 2 +- etcdctl/main.go | 4 ++-- scripts/test_lib.sh | 4 ++-- tests/e2e/ctl_v3_snapshot_test.go | 2 +- tests/functional/rpcpb/member.go | 2 +- tests/integration/snapshot/v3_snapshot_test.go | 2 +- 13 files changed, 15 insertions(+), 15 deletions(-) diff --git a/etcdctl/ctlv2/ctl.go b/etcdctl/ctlv2/ctl.go index 5e48c3ff6..981da0d9f 100644 --- a/etcdctl/ctlv2/ctl.go +++ b/etcdctl/ctlv2/ctl.go @@ -21,7 +21,7 @@ import ( "time" "go.etcd.io/etcd/api/v3/version" - "go.etcd.io/etcd/v3/etcdctl/ctlv2/command" + "go.etcd.io/etcd/etcdctl/v3/ctlv2/command" "github.com/urfave/cli" ) diff --git a/etcdctl/ctlv3/command/printer.go b/etcdctl/ctlv3/command/printer.go index fc703bafb..869d580f9 100644 --- a/etcdctl/ctlv3/command/printer.go +++ b/etcdctl/ctlv3/command/printer.go @@ -21,7 +21,7 @@ import ( pb "go.etcd.io/etcd/api/v3/etcdserverpb" v3 "go.etcd.io/etcd/client/v3" - "go.etcd.io/etcd/v3/etcdctl/snapshot" + "go.etcd.io/etcd/etcdctl/v3/snapshot" "github.com/dustin/go-humanize" ) diff --git a/etcdctl/ctlv3/command/printer_fields.go b/etcdctl/ctlv3/command/printer_fields.go index abb873ae4..687fbba48 100644 --- a/etcdctl/ctlv3/command/printer_fields.go +++ b/etcdctl/ctlv3/command/printer_fields.go @@ -20,7 +20,7 @@ import ( pb "go.etcd.io/etcd/api/v3/etcdserverpb" spb "go.etcd.io/etcd/api/v3/mvccpb" v3 "go.etcd.io/etcd/client/v3" - "go.etcd.io/etcd/v3/etcdctl/snapshot" + "go.etcd.io/etcd/etcdctl/v3/snapshot" ) type fieldsPrinter struct{ printer } diff --git a/etcdctl/ctlv3/command/printer_json.go b/etcdctl/ctlv3/command/printer_json.go index 93f365580..4d9732b95 100644 --- a/etcdctl/ctlv3/command/printer_json.go +++ b/etcdctl/ctlv3/command/printer_json.go @@ -22,7 +22,7 @@ import ( "strconv" "go.etcd.io/etcd/client/v3" - "go.etcd.io/etcd/v3/etcdctl/snapshot" + "go.etcd.io/etcd/etcdctl/v3/snapshot" ) type jsonPrinter struct { diff --git a/etcdctl/ctlv3/command/printer_simple.go b/etcdctl/ctlv3/command/printer_simple.go index 33d285c5f..0fc89fef5 100644 --- a/etcdctl/ctlv3/command/printer_simple.go +++ b/etcdctl/ctlv3/command/printer_simple.go @@ -21,8 +21,8 @@ import ( pb "go.etcd.io/etcd/api/v3/etcdserverpb" v3 "go.etcd.io/etcd/client/v3" + "go.etcd.io/etcd/etcdctl/v3/snapshot" "go.etcd.io/etcd/pkg/v3/types" - "go.etcd.io/etcd/v3/etcdctl/snapshot" ) type simplePrinter struct { diff --git a/etcdctl/ctlv3/command/printer_table.go b/etcdctl/ctlv3/command/printer_table.go index 3fdaaf608..d9d49a2ec 100644 --- a/etcdctl/ctlv3/command/printer_table.go +++ b/etcdctl/ctlv3/command/printer_table.go @@ -18,7 +18,7 @@ import ( "os" v3 "go.etcd.io/etcd/client/v3" - "go.etcd.io/etcd/v3/etcdctl/snapshot" + "go.etcd.io/etcd/etcdctl/v3/snapshot" "github.com/olekukonko/tablewriter" ) diff --git a/etcdctl/ctlv3/command/snapshot_command.go b/etcdctl/ctlv3/command/snapshot_command.go index 3cf2cbf12..c1d14bd63 100644 --- a/etcdctl/ctlv3/command/snapshot_command.go +++ b/etcdctl/ctlv3/command/snapshot_command.go @@ -20,7 +20,7 @@ import ( "path/filepath" "strings" - "go.etcd.io/etcd/v3/etcdctl/snapshot" + "go.etcd.io/etcd/etcdctl/v3/snapshot" "github.com/spf13/cobra" "go.uber.org/zap" diff --git a/etcdctl/ctlv3/ctl.go b/etcdctl/ctlv3/ctl.go index e16e8e3c2..64cf617b9 100644 --- a/etcdctl/ctlv3/ctl.go +++ b/etcdctl/ctlv3/ctl.go @@ -18,7 +18,7 @@ package ctlv3 import ( "time" - "go.etcd.io/etcd/v3/etcdctl/ctlv3/command" + "go.etcd.io/etcd/etcdctl/v3/ctlv3/command" "github.com/spf13/cobra" ) diff --git a/etcdctl/main.go b/etcdctl/main.go index 754088df7..7fbd771f6 100644 --- a/etcdctl/main.go +++ b/etcdctl/main.go @@ -19,8 +19,8 @@ import ( "fmt" "os" - "go.etcd.io/etcd/v3/etcdctl/ctlv2" - "go.etcd.io/etcd/v3/etcdctl/ctlv3" + "go.etcd.io/etcd/etcdctl/v3/ctlv2" + "go.etcd.io/etcd/etcdctl/v3/ctlv3" ) const ( diff --git a/scripts/test_lib.sh b/scripts/test_lib.sh index 1bd969fe3..2387cbdb5 100644 --- a/scripts/test_lib.sh +++ b/scripts/test_lib.sh @@ -110,8 +110,8 @@ function modules() { go.etcd.io/etcd/raft/v3 go.etcd.io/etcd/client/v2 go.etcd.io/etcd/client/v3 - go.etcd.io/etcd/etcdctl/v3 go.etcd.io/etcd/v3 + go.etcd.io/etcd/etcdctl/v3 go.etcd.io/etcd/tests/v3" } @@ -132,8 +132,8 @@ function run_for_modules { run_for_module "raft" "$@" "${pkg}" || return "$?" run_for_module "client/v2" "$@" "${pkg}" || return "$?" run_for_module "client/v3" "$@" "${pkg}" || return "$?" - run_for_module "etcdctl" "$@" "${pkg}" || return "$?" run_for_module "." "$@" "${pkg}" || return "$?" + run_for_module "etcdctl" "$@" "${pkg}" || return "$?" run_for_module "tests" "$@" "${pkg}" || return "$?" else run_for_module "${USERMOD}" "$@" "${pkg}" || return "$?" diff --git a/tests/e2e/ctl_v3_snapshot_test.go b/tests/e2e/ctl_v3_snapshot_test.go index f40933be5..bf6c8dc30 100644 --- a/tests/e2e/ctl_v3_snapshot_test.go +++ b/tests/e2e/ctl_v3_snapshot_test.go @@ -25,9 +25,9 @@ import ( "testing" "time" + "go.etcd.io/etcd/etcdctl/v3/snapshot" "go.etcd.io/etcd/pkg/v3/expect" "go.etcd.io/etcd/pkg/v3/testutil" - "go.etcd.io/etcd/v3/etcdctl/snapshot" ) func TestCtlV3Snapshot(t *testing.T) { testCtl(t, snapshotTest) } diff --git a/tests/functional/rpcpb/member.go b/tests/functional/rpcpb/member.go index 68e23184c..4f1c11a59 100644 --- a/tests/functional/rpcpb/member.go +++ b/tests/functional/rpcpb/member.go @@ -24,9 +24,9 @@ import ( pb "go.etcd.io/etcd/api/v3/etcdserverpb" "go.etcd.io/etcd/client/v3" + "go.etcd.io/etcd/etcdctl/v3/snapshot" "go.etcd.io/etcd/pkg/v3/logutil" "go.etcd.io/etcd/pkg/v3/transport" - "go.etcd.io/etcd/v3/etcdctl/snapshot" "github.com/dustin/go-humanize" "go.uber.org/zap" diff --git a/tests/integration/snapshot/v3_snapshot_test.go b/tests/integration/snapshot/v3_snapshot_test.go index 40a4e32db..41f8a8d01 100644 --- a/tests/integration/snapshot/v3_snapshot_test.go +++ b/tests/integration/snapshot/v3_snapshot_test.go @@ -26,9 +26,9 @@ import ( "time" "go.etcd.io/etcd/client/v3" + "go.etcd.io/etcd/etcdctl/v3/snapshot" "go.etcd.io/etcd/pkg/v3/testutil" "go.etcd.io/etcd/v3/embed" - "go.etcd.io/etcd/v3/etcdctl/snapshot" "go.uber.org/zap" )