You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: tx.go
    path of file: ./repos/plik/vendor/github.com/jackc/pgx/v5
    
    the code of the file until where you have to start completion: package pgx

import (
	"context"
	"errors"
	"fmt"
	"strconv"
	"strings"

	"github.com/jackc
    
func (tx *dbTx) Rollback(ctx context.Context) error {
	if tx.closed {
		return ErrTxClosed
	}

	_, err := tx.conn.Exec(ctx, "rollback")
	tx.closed = true
	if err != nil {
		// A rollback failure leaves the connection in an undefined state
		tx.conn.die(fmt.Errorf("rollback failed: %w", err))
		return err
	}

	return nil
}