github.com/kunnos/engine@v1.13.1/cli/command/swarm/cmd.go (about)

     1  package swarm
     2  
     3  import (
     4  	"github.com/spf13/cobra"
     5  
     6  	"github.com/docker/docker/cli"
     7  	"github.com/docker/docker/cli/command"
     8  )
     9  
    10  // NewSwarmCommand returns a cobra command for `swarm` subcommands
    11  func NewSwarmCommand(dockerCli *command.DockerCli) *cobra.Command {
    12  	cmd := &cobra.Command{
    13  		Use:   "swarm",
    14  		Short: "Manage Swarm",
    15  		Args:  cli.NoArgs,
    16  		RunE:  dockerCli.ShowHelp,
    17  	}
    18  	cmd.AddCommand(
    19  		newInitCommand(dockerCli),
    20  		newJoinCommand(dockerCli),
    21  		newJoinTokenCommand(dockerCli),
    22  		newUnlockKeyCommand(dockerCli),
    23  		newUpdateCommand(dockerCli),
    24  		newLeaveCommand(dockerCli),
    25  		newUnlockCommand(dockerCli),
    26  	)
    27  	return cmd
    28  }