feat: upgrade golangci-lint to 1.45.2

This commit is contained in:
kolaente 2022-03-27 16:55:37 +02:00
parent 09c0d14444
commit 5cf263a86f
Signed by untrusted user who does not match committer: konrad
GPG key ID: F40E70337AB24C9B
20 changed files with 77 additions and 59 deletions

View file

@ -683,17 +683,17 @@ create unique index UQE_users_namespace_id
sess := tx.NewSession()
if err := sess.Begin(); err != nil {
return fmt.Errorf("unable to open session: %s", err)
return fmt.Errorf("unable to open session: %w", err)
}
for _, s := range sql {
_, err := sess.Exec(s)
if err != nil {
_ = sess.Rollback()
return fmt.Errorf("error executing update data for table %s, column %s: %s", table, column, err)
return fmt.Errorf("error executing update data for table %s, column %s: %w", table, column, err)
}
}
if err := sess.Commit(); err != nil {
return fmt.Errorf("error committing data change: %s", err)
return fmt.Errorf("error committing data change: %w", err)
}
return nil
}