diff --git a/command/commands.go b/command/commands.go index 607e4dc375..e77436605c 100644 --- a/command/commands.go +++ b/command/commands.go @@ -28,13 +28,13 @@ import ( "github.com/hashicorp/consul/command/maint" "github.com/hashicorp/consul/command/members" "github.com/hashicorp/consul/command/monitor" - "github.com/hashicorp/consul/command/oper" - "github.com/hashicorp/consul/command/operauto" - "github.com/hashicorp/consul/command/operautoget" - "github.com/hashicorp/consul/command/operautoset" - "github.com/hashicorp/consul/command/operraft" - "github.com/hashicorp/consul/command/operraftlist" - "github.com/hashicorp/consul/command/operraftremove" + "github.com/hashicorp/consul/command/operator" + operauto "github.com/hashicorp/consul/command/operator/autopilot" + operautoget "github.com/hashicorp/consul/command/operator/autopilot/get" + operautoset "github.com/hashicorp/consul/command/operator/autopilot/set" + operraft "github.com/hashicorp/consul/command/operator/raft" + operraftlist "github.com/hashicorp/consul/command/operator/raft/listpeers" + operraftremove "github.com/hashicorp/consul/command/operator/raft/removepeer" "github.com/hashicorp/consul/command/reload" "github.com/hashicorp/consul/command/rtt" "github.com/hashicorp/consul/command/snapshot" @@ -88,7 +88,7 @@ func init() { "maint": func() (cli.Command, error) { return maint.New(ui), nil }, "members": func() (cli.Command, error) { return members.New(ui), nil }, "monitor": func() (cli.Command, error) { return monitor.New(ui, makeShutdownCh()), nil }, - "operator": func() (cli.Command, error) { return oper.New(), nil }, + "operator": func() (cli.Command, error) { return operator.New(), nil }, "operator autopilot": func() (cli.Command, error) { return operauto.New(), nil }, "operator autopilot get-config": func() (cli.Command, error) { return operautoget.New(ui), nil }, "operator autopilot set-config": func() (cli.Command, error) { return operautoset.New(ui), nil }, diff --git a/command/operautoget/operator_autopilot_get.go b/command/operator/autopilot/get/operator_autopilot_get.go similarity index 99% rename from command/operautoget/operator_autopilot_get.go rename to command/operator/autopilot/get/operator_autopilot_get.go index 37c1b711be..58dfd4d0db 100644 --- a/command/operautoget/operator_autopilot_get.go +++ b/command/operator/autopilot/get/operator_autopilot_get.go @@ -1,4 +1,4 @@ -package operautoget +package get import ( "flag" diff --git a/command/operautoget/operator_autopilot_get_test.go b/command/operator/autopilot/get/operator_autopilot_get_test.go similarity index 97% rename from command/operautoget/operator_autopilot_get_test.go rename to command/operator/autopilot/get/operator_autopilot_get_test.go index d53486d9bf..cb93c8fcb1 100644 --- a/command/operautoget/operator_autopilot_get_test.go +++ b/command/operator/autopilot/get/operator_autopilot_get_test.go @@ -1,4 +1,4 @@ -package operautoget +package get import ( "strings" diff --git a/command/operauto/operator_autopilot.go b/command/operator/autopilot/operator_autopilot.go similarity index 96% rename from command/operauto/operator_autopilot.go rename to command/operator/autopilot/operator_autopilot.go index 87f2cb51b5..02f361a026 100644 --- a/command/operauto/operator_autopilot.go +++ b/command/operator/autopilot/operator_autopilot.go @@ -1,4 +1,4 @@ -package operauto +package autopilot import ( "github.com/mitchellh/cli" diff --git a/command/operauto/operator_autopilot_test.go b/command/operator/autopilot/operator_autopilot_test.go similarity index 91% rename from command/operauto/operator_autopilot_test.go rename to command/operator/autopilot/operator_autopilot_test.go index 02847f2a3e..00d8d8bc4d 100644 --- a/command/operauto/operator_autopilot_test.go +++ b/command/operator/autopilot/operator_autopilot_test.go @@ -1,4 +1,4 @@ -package operauto +package autopilot import ( "strings" diff --git a/command/operautoset/operator_autopilot_set.go b/command/operator/autopilot/set/operator_autopilot_set.go similarity index 99% rename from command/operautoset/operator_autopilot_set.go rename to command/operator/autopilot/set/operator_autopilot_set.go index d162b201bd..91ecdf56fe 100644 --- a/command/operautoset/operator_autopilot_set.go +++ b/command/operator/autopilot/set/operator_autopilot_set.go @@ -1,4 +1,4 @@ -package operautoset +package set import ( "flag" diff --git a/command/operautoset/operator_autopilot_set_test.go b/command/operator/autopilot/set/operator_autopilot_set_test.go similarity index 98% rename from command/operautoset/operator_autopilot_set_test.go rename to command/operator/autopilot/set/operator_autopilot_set_test.go index 217cf57f55..18d44c9b6d 100644 --- a/command/operautoset/operator_autopilot_set_test.go +++ b/command/operator/autopilot/set/operator_autopilot_set_test.go @@ -1,4 +1,4 @@ -package operautoset +package set import ( "strings" diff --git a/command/oper/operator.go b/command/operator/operator.go similarity index 98% rename from command/oper/operator.go rename to command/operator/operator.go index 4c1fbb584b..2115fee449 100644 --- a/command/oper/operator.go +++ b/command/operator/operator.go @@ -1,4 +1,4 @@ -package oper +package operator import ( "github.com/mitchellh/cli" diff --git a/command/oper/operator_test.go b/command/operator/operator_test.go similarity index 91% rename from command/oper/operator_test.go rename to command/operator/operator_test.go index f540fe3770..c06f8e6f07 100644 --- a/command/oper/operator_test.go +++ b/command/operator/operator_test.go @@ -1,4 +1,4 @@ -package oper +package operator import ( "strings" diff --git a/command/operraftlist/operator_raft_list.go b/command/operator/raft/listpeers/operator_raft_list.go similarity index 99% rename from command/operraftlist/operator_raft_list.go rename to command/operator/raft/listpeers/operator_raft_list.go index b6e71c7861..703a054148 100644 --- a/command/operraftlist/operator_raft_list.go +++ b/command/operator/raft/listpeers/operator_raft_list.go @@ -1,4 +1,4 @@ -package operraftlist +package listpeers import ( "flag" diff --git a/command/operraftlist/operator_raft_list_test.go b/command/operator/raft/listpeers/operator_raft_list_test.go similarity index 97% rename from command/operraftlist/operator_raft_list_test.go rename to command/operator/raft/listpeers/operator_raft_list_test.go index 6098b5db50..8d32109817 100644 --- a/command/operraftlist/operator_raft_list_test.go +++ b/command/operator/raft/listpeers/operator_raft_list_test.go @@ -1,4 +1,4 @@ -package operraftlist +package listpeers import ( "fmt" diff --git a/command/operraft/operator_raft.go b/command/operator/raft/operator_raft.go similarity index 96% rename from command/operraft/operator_raft.go rename to command/operator/raft/operator_raft.go index c516ad5d51..ae7f2000d1 100644 --- a/command/operraft/operator_raft.go +++ b/command/operator/raft/operator_raft.go @@ -1,4 +1,4 @@ -package operraft +package raft import ( "github.com/mitchellh/cli" diff --git a/command/operraft/operator_raft_test.go b/command/operator/raft/operator_raft_test.go similarity index 91% rename from command/operraft/operator_raft_test.go rename to command/operator/raft/operator_raft_test.go index 3ba5e23a78..9ea2d921bb 100644 --- a/command/operraft/operator_raft_test.go +++ b/command/operator/raft/operator_raft_test.go @@ -1,4 +1,4 @@ -package operraft +package raft import ( "strings" diff --git a/command/operraftremove/operator_raft_remove.go b/command/operator/raft/removepeer/operator_raft_remove.go similarity index 99% rename from command/operraftremove/operator_raft_remove.go rename to command/operator/raft/removepeer/operator_raft_remove.go index 3c1edfbcb7..f4303bc034 100644 --- a/command/operraftremove/operator_raft_remove.go +++ b/command/operator/raft/removepeer/operator_raft_remove.go @@ -1,4 +1,4 @@ -package operraftremove +package removepeer import ( "flag" diff --git a/command/operraftremove/operator_raft_remove_test.go b/command/operator/raft/removepeer/operator_raft_remove_test.go similarity index 98% rename from command/operraftremove/operator_raft_remove_test.go rename to command/operator/raft/removepeer/operator_raft_remove_test.go index 90c600b6f0..212a2bebee 100644 --- a/command/operraftremove/operator_raft_remove_test.go +++ b/command/operator/raft/removepeer/operator_raft_remove_test.go @@ -1,4 +1,4 @@ -package operraftremove +package removepeer import ( "strings"