mirror of https://github.com/docker/cli.git
Unexport subcommands
These commands were only used as subcommands, so did not have to be exported. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
79e4d635ca
commit
9c7b0d74cd
|
@ -18,8 +18,8 @@ func NewSystemCommand(dockerCli *command.DockerCli) *cobra.Command {
|
||||||
cmd.AddCommand(
|
cmd.AddCommand(
|
||||||
NewEventsCommand(dockerCli),
|
NewEventsCommand(dockerCli),
|
||||||
NewInfoCommand(dockerCli),
|
NewInfoCommand(dockerCli),
|
||||||
NewDiskUsageCommand(dockerCli),
|
newDiskUsageCommand(dockerCli),
|
||||||
NewPruneCommand(dockerCli),
|
newPruneCommand(dockerCli),
|
||||||
)
|
)
|
||||||
|
|
||||||
return cmd
|
return cmd
|
||||||
|
|
|
@ -15,8 +15,8 @@ type diskUsageOptions struct {
|
||||||
format string
|
format string
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewDiskUsageCommand creates a new cobra.Command for `docker df`
|
// newDiskUsageCommand creates a new cobra.Command for `docker df`
|
||||||
func NewDiskUsageCommand(dockerCli *command.DockerCli) *cobra.Command {
|
func newDiskUsageCommand(dockerCli *command.DockerCli) *cobra.Command {
|
||||||
var opts diskUsageOptions
|
var opts diskUsageOptions
|
||||||
|
|
||||||
cmd := &cobra.Command{
|
cmd := &cobra.Command{
|
||||||
|
|
|
@ -26,8 +26,8 @@ type pruneOptions struct {
|
||||||
filter opts.FilterOpt
|
filter opts.FilterOpt
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewPruneCommand creates a new cobra.Command for `docker prune`
|
// newPruneCommand creates a new cobra.Command for `docker prune`
|
||||||
func NewPruneCommand(dockerCli command.Cli) *cobra.Command {
|
func newPruneCommand(dockerCli command.Cli) *cobra.Command {
|
||||||
options := pruneOptions{filter: opts.NewFilterOpt(), pruneBuildCache: true}
|
options := pruneOptions{filter: opts.NewFilterOpt(), pruneBuildCache: true}
|
||||||
|
|
||||||
cmd := &cobra.Command{
|
cmd := &cobra.Command{
|
||||||
|
|
|
@ -9,7 +9,7 @@ import (
|
||||||
|
|
||||||
func TestPrunePromptPre131(t *testing.T) {
|
func TestPrunePromptPre131(t *testing.T) {
|
||||||
cli := test.NewFakeCli(&fakeClient{version: "1.30"})
|
cli := test.NewFakeCli(&fakeClient{version: "1.30"})
|
||||||
cmd := NewPruneCommand(cli)
|
cmd := newPruneCommand(cli)
|
||||||
assert.NoError(t, cmd.Execute())
|
assert.NoError(t, cmd.Execute())
|
||||||
assert.NotContains(t, cli.OutBuffer().String(), "all build cache")
|
assert.NotContains(t, cli.OutBuffer().String(), "all build cache")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue