Skip to content

Commit

Permalink
style: fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
morigs committed Aug 24, 2022
1 parent 9f21d9c commit bf926fa
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions database/yugabytedb/yugabytedb.go
Expand Up @@ -5,7 +5,6 @@ import (
"database/sql"
"errors"
"io"
"io/ioutil"
"net/url"
"regexp"
"strconv"
Expand Down Expand Up @@ -255,7 +254,7 @@ func (c *YugabyteDB) Unlock() error {
}

func (c *YugabyteDB) Run(migration io.Reader) error {
migr, err := ioutil.ReadAll(migration)
migr, err := io.ReadAll(migration)
if err != nil {
return err
}
Expand Down Expand Up @@ -418,6 +417,8 @@ func (c *YugabyteDB) doTxWithRetry(
return backoff.Permanent(err)
}

// If we've tried to commit the transaction Rollback just returns sql.ErrTxDone.
//nolint:errcheck
defer tx.Rollback()

if err := fn(tx); err != nil && !errIsRetryable(err) {
Expand Down

0 comments on commit bf926fa

Please sign in to comment.