code: func Finalize(err *error, tx *sql.Tx) {
  	if *err == nil {
  		*err = tx.Commit()
  		if *err != nil {
  			fmt.Fprintf(os.Stderr, "[!] failed to commit transaction: %s\n", *err)
  			os.Exit(1)
  		}
  	} else {
  		tx.Rollback()
  	}
  }
docs: // Finalize finishes a transaction, committing it if needed or rolling
  // back on error.