logout.go 598 B

12345678910111213141516171819202122232425
  1. package logout
  2. import (
  3. "github.com/spf13/cobra"
  4. "github.com/docker/api/cli/mobycli"
  5. )
  6. // Command returns the login command
  7. func Command() *cobra.Command {
  8. cmd := &cobra.Command{
  9. Use: "logout [SERVER]",
  10. Short: "Log out from a Docker registry or cloud backend",
  11. Long: "Log out from a Docker registry or cloud backend.\nIf no server is specified, the default is defined by the daemon.",
  12. Args: cobra.MaximumNArgs(0),
  13. RunE: runLogout,
  14. }
  15. cmd.AddCommand(AzureLogoutCommand())
  16. return cmd
  17. }
  18. func runLogout(cmd *cobra.Command, args []string) error {
  19. return mobycli.ExecCmd(cmd)
  20. }