From 9c7b0d74cdd82313c9fa46a74071792c2c0c62af Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Tue, 18 Jul 2017 15:26:45 +0200 Subject: [PATCH] Unexport subcommands These commands were only used as subcommands, so did not have to be exported. Signed-off-by: Sebastiaan van Stijn --- cli/command/system/cmd.go | 4 ++-- cli/command/system/df.go | 4 ++-- cli/command/system/prune.go | 4 ++-- cli/command/system/prune_test.go | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cli/command/system/cmd.go b/cli/command/system/cmd.go index 455387cd46..60979e7224 100644 --- a/cli/command/system/cmd.go +++ b/cli/command/system/cmd.go @@ -18,8 +18,8 @@ func NewSystemCommand(dockerCli *command.DockerCli) *cobra.Command { cmd.AddCommand( NewEventsCommand(dockerCli), NewInfoCommand(dockerCli), - NewDiskUsageCommand(dockerCli), - NewPruneCommand(dockerCli), + newDiskUsageCommand(dockerCli), + newPruneCommand(dockerCli), ) return cmd diff --git a/cli/command/system/df.go b/cli/command/system/df.go index d8f9bdc021..5146482f0e 100644 --- a/cli/command/system/df.go +++ b/cli/command/system/df.go @@ -15,8 +15,8 @@ type diskUsageOptions struct { format string } -// NewDiskUsageCommand creates a new cobra.Command for `docker df` -func NewDiskUsageCommand(dockerCli *command.DockerCli) *cobra.Command { +// newDiskUsageCommand creates a new cobra.Command for `docker df` +func newDiskUsageCommand(dockerCli *command.DockerCli) *cobra.Command { var opts diskUsageOptions cmd := &cobra.Command{ diff --git a/cli/command/system/prune.go b/cli/command/system/prune.go index 9afe0a317c..6e721ea004 100644 --- a/cli/command/system/prune.go +++ b/cli/command/system/prune.go @@ -26,8 +26,8 @@ type pruneOptions struct { filter opts.FilterOpt } -// NewPruneCommand creates a new cobra.Command for `docker prune` -func NewPruneCommand(dockerCli command.Cli) *cobra.Command { +// newPruneCommand creates a new cobra.Command for `docker prune` +func newPruneCommand(dockerCli command.Cli) *cobra.Command { options := pruneOptions{filter: opts.NewFilterOpt(), pruneBuildCache: true} cmd := &cobra.Command{ diff --git a/cli/command/system/prune_test.go b/cli/command/system/prune_test.go index 980a93865f..669166c998 100644 --- a/cli/command/system/prune_test.go +++ b/cli/command/system/prune_test.go @@ -9,7 +9,7 @@ import ( func TestPrunePromptPre131(t *testing.T) { cli := test.NewFakeCli(&fakeClient{version: "1.30"}) - cmd := NewPruneCommand(cli) + cmd := newPruneCommand(cli) assert.NoError(t, cmd.Execute()) assert.NotContains(t, cli.OutBuffer().String(), "all build cache") }