txutil

package
v1.0.1-0...-5a0dde2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 20, 2026 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package txutil contains transaction cleanup shared by database-owning packages. It deliberately has no project dependencies.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Rollback

func Rollback(tx *sql.Tx, resultErr *error)

Rollback is a deferred transaction guard. A successful commit makes Rollback return sql.ErrTxDone, which is expected and ignored. On every other path a rollback failure is operationally relevant: join it to the primary error without replacing that error, or return it when cleanup was the only failure.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL