code: func NewLogoutCommand(dockerCli command.Cli) *cobra.Command {
  	cmd := &cobra.Command{
  		Use:   "logout [SERVER]",
  		Short: "Log out from a Docker registry",
  		Long:  "Log out from a Docker registry.\nIf no server is specified, the default is defined by the daemon.",
  		Args:  cli.RequiresMaxArgs(1),
  		RunE: func(cmd *cobra.Command, args []string) error {
  			var serverAddress string
  			if len(args) > 0 {
  				serverAddress = args[0]
  			}
  			return runLogout(dockerCli, serverAddress)
  		},
  	}
  
  	return cmd
  }
docs: // NewLogoutCommand creates a new `docker logout` command