github.com/justincormack/cli@v0.0.0-20201215022714-831ebeae9675/cli/command/network/cmd.go (about)

     1  package network
     2  
     3  import (
     4  	"github.com/spf13/cobra"
     5  
     6  	"github.com/docker/cli/cli"
     7  	"github.com/docker/cli/cli/command"
     8  )
     9  
    10  // NewNetworkCommand returns a cobra command for `network` subcommands
    11  func NewNetworkCommand(dockerCli command.Cli) *cobra.Command {
    12  	cmd := &cobra.Command{
    13  		Use:         "network",
    14  		Short:       "Manage networks",
    15  		Args:        cli.NoArgs,
    16  		RunE:        command.ShowHelp(dockerCli.Err()),
    17  		Annotations: map[string]string{"version": "1.21"},
    18  	}
    19  	cmd.AddCommand(
    20  		newConnectCommand(dockerCli),
    21  		newCreateCommand(dockerCli),
    22  		newDisconnectCommand(dockerCli),
    23  		newInspectCommand(dockerCli),
    24  		newListCommand(dockerCli),
    25  		newRemoveCommand(dockerCli),
    26  		NewPruneCommand(dockerCli),
    27  	)
    28  	return cmd
    29  }