Skip to content

Glossary: Go in Practice

Commit; rollback

Also written: commit, rollback, tx.Commit, tx.Rollback

A commit makes a transaction's changes permanent; a rollback undoes all of them. `defer tx.Rollback()` undoes everything if the work fails, and does nothing after a commit.

Where the book teaches it

Related terms

Transaction