plugins: deprecate errwrap.Wrapf() (#11590)

* plugins/database/redshift: deprecate errwrap.Wrapf()

* plugins/database/postgresql: deprecate errwrap.Wrapf()

* plugins/database/mysql: deprecate errwrap.Wrapf()

* plugins/database/mssql: deprecate errwrap.Wrapf()

* plugins/database/mongodb: deprecate errwrap.Wrapf()

* plugins/database/influxdb: deprecate errwrap.Wrapf()
This commit is contained in:
Lars Lehtonen
2021-05-21 07:22:29 -07:00
committed by GitHub
parent bea56190e6
commit ee13145436
7 changed files with 27 additions and 34 deletions

View File

@@ -7,7 +7,6 @@ import (
"regexp"
"strings"
"github.com/hashicorp/errwrap"
"github.com/hashicorp/go-multierror"
dbplugin "github.com/hashicorp/vault/sdk/database/dbplugin/v5"
"github.com/hashicorp/vault/sdk/database/helper/connutil"
@@ -445,10 +444,10 @@ func (p *PostgreSQL) defaultDeleteUser(ctx context.Context, username string) err
// can't drop if not all privileges are revoked
if rows.Err() != nil {
return errwrap.Wrapf("could not generate revocation statements for all rows: {{err}}", rows.Err())
return fmt.Errorf("could not generate revocation statements for all rows: %w", rows.Err())
}
if lastStmtError != nil {
return errwrap.Wrapf("could not perform all revocation statements: {{err}}", lastStmtError)
return fmt.Errorf("could not perform all revocation statements: %w", lastStmtError)
}
// Drop this user