diff --git a/command/cat/catalog.go b/command/catalog/catalog.go similarity index 98% rename from command/cat/catalog.go rename to command/catalog/catalog.go index e03c72453b..22945fe0ab 100644 --- a/command/cat/catalog.go +++ b/command/catalog/catalog.go @@ -1,4 +1,4 @@ -package cat +package catalog import ( "github.com/hashicorp/consul/command/flags" diff --git a/command/cat/catalog_test.go b/command/catalog/catalog_test.go similarity index 91% rename from command/cat/catalog_test.go rename to command/catalog/catalog_test.go index 2240a85ad0..f0175371fb 100644 --- a/command/cat/catalog_test.go +++ b/command/catalog/catalog_test.go @@ -1,4 +1,4 @@ -package cat +package catalog import ( "strings" diff --git a/command/catlistdc/catalog_list_datacenters.go b/command/catalog/list/dc/catalog_list_datacenters.go similarity index 98% rename from command/catlistdc/catalog_list_datacenters.go rename to command/catalog/list/dc/catalog_list_datacenters.go index b1051f1d04..ad38466997 100644 --- a/command/catlistdc/catalog_list_datacenters.go +++ b/command/catalog/list/dc/catalog_list_datacenters.go @@ -1,4 +1,4 @@ -package catlistdc +package dc import ( "flag" diff --git a/command/catlistdc/catalog_list_datacenters_test.go b/command/catalog/list/dc/catalog_list_datacenters_test.go similarity index 98% rename from command/catlistdc/catalog_list_datacenters_test.go rename to command/catalog/list/dc/catalog_list_datacenters_test.go index 782bba8f52..676ccd501e 100644 --- a/command/catlistdc/catalog_list_datacenters_test.go +++ b/command/catalog/list/dc/catalog_list_datacenters_test.go @@ -1,4 +1,4 @@ -package catlistdc +package dc import ( "strings" diff --git a/command/catlistnodes/catalog_list_nodes.go b/command/catalog/list/nodes/catalog_list_nodes.go similarity index 99% rename from command/catlistnodes/catalog_list_nodes.go rename to command/catalog/list/nodes/catalog_list_nodes.go index c96eb207fe..27a294b8e0 100644 --- a/command/catlistnodes/catalog_list_nodes.go +++ b/command/catalog/list/nodes/catalog_list_nodes.go @@ -1,4 +1,4 @@ -package catlistnodes +package nodes import ( "flag" diff --git a/command/catlistnodes/catalog_list_nodes_test.go b/command/catalog/list/nodes/catalog_list_nodes_test.go similarity index 99% rename from command/catlistnodes/catalog_list_nodes_test.go rename to command/catalog/list/nodes/catalog_list_nodes_test.go index eba59c857d..de95da9339 100644 --- a/command/catlistnodes/catalog_list_nodes_test.go +++ b/command/catalog/list/nodes/catalog_list_nodes_test.go @@ -1,4 +1,4 @@ -package catlistnodes +package nodes import ( "strings" diff --git a/command/catlistsvc/catalog_list_services.go b/command/catalog/list/services/catalog_list_services.go similarity index 99% rename from command/catlistsvc/catalog_list_services.go rename to command/catalog/list/services/catalog_list_services.go index 209cf3dcaf..f178406a22 100644 --- a/command/catlistsvc/catalog_list_services.go +++ b/command/catalog/list/services/catalog_list_services.go @@ -1,4 +1,4 @@ -package catlistsvc +package services import ( "bytes" diff --git a/command/catlistsvc/catalog_list_services_test.go b/command/catalog/list/services/catalog_list_services_test.go similarity index 99% rename from command/catlistsvc/catalog_list_services_test.go rename to command/catalog/list/services/catalog_list_services_test.go index fe1883f462..529b87f785 100644 --- a/command/catlistsvc/catalog_list_services_test.go +++ b/command/catalog/list/services/catalog_list_services_test.go @@ -1,4 +1,4 @@ -package catlistsvc +package services import ( "strings" diff --git a/command/commands.go b/command/commands.go index 9b0b7a5749..3f2cb2bb58 100644 --- a/command/commands.go +++ b/command/commands.go @@ -6,10 +6,10 @@ import ( "syscall" agentcmd "github.com/hashicorp/consul/command/agent" - "github.com/hashicorp/consul/command/cat" - "github.com/hashicorp/consul/command/catlistdc" - "github.com/hashicorp/consul/command/catlistnodes" - "github.com/hashicorp/consul/command/catlistsvc" + "github.com/hashicorp/consul/command/catalog" + catlistdccmd "github.com/hashicorp/consul/command/catalog/list/dc" + catlistnodescmd "github.com/hashicorp/consul/command/catalog/list/nodes" + catlistsvccmd "github.com/hashicorp/consul/command/catalog/list/services" "github.com/hashicorp/consul/command/event" execmd "github.com/hashicorp/consul/command/exec" "github.com/hashicorp/consul/command/forceleave" @@ -66,10 +66,10 @@ func init() { ), nil }, - "catalog": func() (cli.Command, error) { return cat.New(), nil }, - "catalog datacenters": func() (cli.Command, error) { return catlistdc.New(ui), nil }, - "catalog nodes": func() (cli.Command, error) { return catlistnodes.New(ui), nil }, - "catalog services": func() (cli.Command, error) { return catlistsvc.New(ui), nil }, + "catalog": func() (cli.Command, error) { return catalog.New(), nil }, + "catalog datacenters": func() (cli.Command, error) { return catlistdccmd.New(ui), nil }, + "catalog nodes": func() (cli.Command, error) { return catlistnodescmd.New(ui), nil }, + "catalog services": func() (cli.Command, error) { return catlistsvccmd.New(ui), nil }, "event": func() (cli.Command, error) { return event.New(ui), nil }, "exec": func() (cli.Command, error) { return execmd.New(ui, makeShutdownCh()), nil }, "force-leave": func() (cli.Command, error) { return forceleave.New(ui), nil },