diff --git a/command/commands.go b/command/commands.go index 0b45282381..9b0b7a5749 100644 --- a/command/commands.go +++ b/command/commands.go @@ -38,9 +38,9 @@ import ( "github.com/hashicorp/consul/command/reload" "github.com/hashicorp/consul/command/rtt" "github.com/hashicorp/consul/command/snapshot" - "github.com/hashicorp/consul/command/snapshotinspect" - "github.com/hashicorp/consul/command/snapshotrestore" - "github.com/hashicorp/consul/command/snapshotsave" + snapinspectcmd "github.com/hashicorp/consul/command/snapshot/inspect" + snaprestorecmd "github.com/hashicorp/consul/command/snapshot/restore" + snapsavecmd "github.com/hashicorp/consul/command/snapshot/save" "github.com/hashicorp/consul/command/validate" versioncmd "github.com/hashicorp/consul/command/version" watchcmd "github.com/hashicorp/consul/command/watch" @@ -98,9 +98,9 @@ func init() { "reload": func() (cli.Command, error) { return reload.New(ui), nil }, "rtt": func() (cli.Command, error) { return rtt.New(ui), nil }, "snapshot": func() (cli.Command, error) { return snapshot.New(), nil }, - "snapshot inspect": func() (cli.Command, error) { return snapshotinspect.New(ui), nil }, - "snapshot restore": func() (cli.Command, error) { return snapshotrestore.New(ui), nil }, - "snapshot save": func() (cli.Command, error) { return snapshotsave.New(ui), nil }, + "snapshot inspect": func() (cli.Command, error) { return snapinspectcmd.New(ui), nil }, + "snapshot restore": func() (cli.Command, error) { return snaprestorecmd.New(ui), nil }, + "snapshot save": func() (cli.Command, error) { return snapsavecmd.New(ui), nil }, "validate": func() (cli.Command, error) { return validate.New(ui), nil }, "version": func() (cli.Command, error) { return versioncmd.New(ui, version.GetHumanVersion()), nil }, "watch": func() (cli.Command, error) { return watchcmd.New(ui, makeShutdownCh()), nil }, diff --git a/command/snapshotinspect/snapshot_inspect.go b/command/snapshot/inspect/snapshot_inspect.go similarity index 98% rename from command/snapshotinspect/snapshot_inspect.go rename to command/snapshot/inspect/snapshot_inspect.go index 0276e259c4..4974fc2161 100644 --- a/command/snapshotinspect/snapshot_inspect.go +++ b/command/snapshot/inspect/snapshot_inspect.go @@ -1,4 +1,4 @@ -package snapshotinspect +package inspect import ( "bytes" diff --git a/command/snapshotinspect/snapshot_inspect_test.go b/command/snapshot/inspect/snapshot_inspect_test.go similarity index 98% rename from command/snapshotinspect/snapshot_inspect_test.go rename to command/snapshot/inspect/snapshot_inspect_test.go index 3bcc43c830..80d5d6a068 100644 --- a/command/snapshotinspect/snapshot_inspect_test.go +++ b/command/snapshot/inspect/snapshot_inspect_test.go @@ -1,4 +1,4 @@ -package snapshotinspect +package inspect import ( "io" diff --git a/command/snapshotrestore/snapshot_restore.go b/command/snapshot/restore/snapshot_restore.go similarity index 98% rename from command/snapshotrestore/snapshot_restore.go rename to command/snapshot/restore/snapshot_restore.go index 2ef79774db..af3aa49c7d 100644 --- a/command/snapshotrestore/snapshot_restore.go +++ b/command/snapshot/restore/snapshot_restore.go @@ -1,4 +1,4 @@ -package snapshotrestore +package restore import ( "flag" diff --git a/command/snapshotrestore/snapshot_restore_test.go b/command/snapshot/restore/snapshot_restore_test.go similarity index 98% rename from command/snapshotrestore/snapshot_restore_test.go rename to command/snapshot/restore/snapshot_restore_test.go index 33c821a246..e5a7a8bd9f 100644 --- a/command/snapshotrestore/snapshot_restore_test.go +++ b/command/snapshot/restore/snapshot_restore_test.go @@ -1,4 +1,4 @@ -package snapshotrestore +package restore import ( "io" diff --git a/command/snapshotsave/snapshot_save.go b/command/snapshot/save/snapshot_save.go similarity index 99% rename from command/snapshotsave/snapshot_save.go rename to command/snapshot/save/snapshot_save.go index 01d4ae46e2..70dbf9063a 100644 --- a/command/snapshotsave/snapshot_save.go +++ b/command/snapshot/save/snapshot_save.go @@ -1,4 +1,4 @@ -package snapshotsave +package save import ( "flag" diff --git a/command/snapshotsave/snapshot_save_test.go b/command/snapshot/save/snapshot_save_test.go similarity index 98% rename from command/snapshotsave/snapshot_save_test.go rename to command/snapshot/save/snapshot_save_test.go index 3d8f844616..cedff08ab6 100644 --- a/command/snapshotsave/snapshot_save_test.go +++ b/command/snapshot/save/snapshot_save_test.go @@ -1,4 +1,4 @@ -package snapshotsave +package save import ( "os"