From d9d63b5814a008eedd02f6726ed51f5da66be78b Mon Sep 17 00:00:00 2001 From: frederikhors <41120635+frederikhors@users.noreply.github.com> Date: Tue, 7 Jun 2022 09:33:25 +0200 Subject: [PATCH] doc/md: use `fmt.Errorf` instead of `errors.Wrapf` (#2608) * Use fmt.Errorf instead of errors.Wrapf * Update transactions.md * Update transactions.md --- doc/md/transactions.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/md/transactions.md b/doc/md/transactions.md index 9f53af003..baa8b3a60 100755 --- a/doc/md/transactions.md +++ b/doc/md/transactions.md @@ -110,12 +110,12 @@ func WithTx(ctx context.Context, client *ent.Client, fn func(tx *ent.Tx) error) }() if err := fn(tx); err != nil { if rerr := tx.Rollback(); rerr != nil { - err = errors.Wrapf(err, "rolling back transaction: %v", rerr) + err = fmt.Errorf("rolling back transaction: %w", rerr) } return err } if err := tx.Commit(); err != nil { - return errors.Wrapf(err, "committing transaction: %v", err) + return fmt.Errorf("committing transaction: %w", err) } return nil }