chore(linting): changes to make clean-transactional-propsal_lint pass… (#10072)

This commit is contained in:
Iraq
2025-06-13 17:05:37 +02:00
committed by GitHub
parent d857c12b0f
commit d75a45ebed
22 changed files with 1024 additions and 1015 deletions

View File

@@ -34,7 +34,7 @@ type Config struct {
// // The value will be taken as is. Multiple options are space separated.
// Options string
configuredFields []string
// configuredFields []string
}
// Connect implements [database.Connector].

View File

@@ -2,6 +2,7 @@ package postgres
import (
"context"
"errors"
"github.com/jackc/pgx/v5"
@@ -25,7 +26,10 @@ func (tx *pgxTx) Rollback(ctx context.Context) error {
// End implements [database.Transaction].
func (tx *pgxTx) End(ctx context.Context, err error) error {
if err != nil {
tx.Rollback(ctx)
rollbackErr := tx.Rollback(ctx)
if rollbackErr != nil {
err = errors.Join(err, rollbackErr)
}
return err
}
return tx.Commit(ctx)