DockerCLI/cli/command/network/cmd.go

30 lines
679 B
Go
Raw Normal View History

package network
import (
"github.com/spf13/cobra"
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"
)
// NewNetworkCommand returns a cobra command for `network` subcommands
// nolint: interfacer
func NewNetworkCommand(dockerCli *command.DockerCli) *cobra.Command {
cmd := &cobra.Command{
Use: "network",
Short: "Manage networks",
Args: cli.NoArgs,
RunE: command.ShowHelp(dockerCli.Err()),
}
cmd.AddCommand(
newConnectCommand(dockerCli),
newCreateCommand(dockerCli),
newDisconnectCommand(dockerCli),
newInspectCommand(dockerCli),
newListCommand(dockerCli),
newRemoveCommand(dockerCli),
NewPruneCommand(dockerCli),
)
return cmd
}