Exemplo n.º 1
0
func handleRemoteRemove(ctx *cli.Context, client *daemon.Client) error {
	idString := ctx.Args()[0]
	id, err := id.Cast(idString)
	if err != nil {
		return ExitCode{
			BadArgs,
			fmt.Sprintf("Invalid ID: %v", err),
		}
	}

	if client.RemoteRemove(id) != nil {
		return ExitCode{
			UnknownError,
			fmt.Sprintf("Unable to remove remote: %v", err),
		}
	}

	return nil
}