Chore: Remove Wrap (#50048)

* Chore: Remove Wrap and Wrapf

* Fix: Add error check
This commit is contained in:
Kat Yang
2022-06-03 09:24:24 +02:00
committed by GitHub
parent 53cb94a2ad
commit 3c3039f5b3
34 changed files with 104 additions and 117 deletions
@@ -133,11 +133,11 @@ func (db *PostgresDialect) CleanDB() error {
defer sess.Close()
if _, err := sess.Exec("DROP SCHEMA public CASCADE;"); err != nil {
return errutil.Wrap("failed to drop schema public", err)
return fmt.Errorf("%v: %w", "failed to drop schema public", err)
}
if _, err := sess.Exec("CREATE SCHEMA public;"); err != nil {
return errutil.Wrap("failed to create schema public", err)
return fmt.Errorf("%v: %w", "failed to create schema public", err)
}
return nil