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

@@ -10,7 +10,6 @@ import (
"sync"
"time"
"github.com/hashicorp/errwrap"
"github.com/hashicorp/vault/sdk/database/helper/connutil"
"github.com/hashicorp/vault/sdk/database/helper/dbutil"
"github.com/mitchellh/mapstructure"
@@ -193,7 +192,7 @@ func (c *mongoDBConnectionProducer) getWriteConcern() (opts *options.ClientOptio
concern := &writeConcern{}
err = json.Unmarshal([]byte(input), concern)
if err != nil {
return nil, errwrap.Wrapf("error unmarshalling write_concern: {{err}}", err)
return nil, fmt.Errorf("error unmarshalling write_concern: %w", err)
}
// Translate write concern to mongo options