compose/cli/cmd/logout/logout.go
Christopher Crone d1a929eb7f cli: Fix logout when specifying a registry
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
2020-07-17 16:29:12 +02:00

26 lines
598 B
Go

package logout
import (
"github.com/spf13/cobra"
"github.com/docker/api/cli/mobycli"
)
// Command returns the login command
func Command() *cobra.Command {
cmd := &cobra.Command{
Use: "logout [SERVER]",
Short: "Log out from a Docker registry or cloud backend",
Long: "Log out from a Docker registry or cloud backend.\nIf no server is specified, the default is defined by the daemon.",
Args: cobra.MaximumNArgs(1),
RunE: runLogout,
}
cmd.AddCommand(AzureLogoutCommand())
return cmd
}
func runLogout(cmd *cobra.Command, args []string) error {
return mobycli.ExecCmd(cmd)
}