Skip to content

Commit b18d46f

Browse files
authored
Update Rollback method comment for clarity
Clarify Rollback method behavior in documentation.
1 parent 7bba745 commit b18d46f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/database/sql/sql.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2354,7 +2354,7 @@ func (tx *Tx) rollback(discardConn bool) error {
23542354
return err
23552355
}
23562356

2357-
// Rollback aborts the transaction.
2357+
// Rollback aborts the transaction. This is a no-op if the transaction is already committed or aborted.
23582358
func (tx *Tx) Rollback() error {
23592359
return tx.rollback(false)
23602360
}

0 commit comments

Comments
 (0)