Use fmt.Errorf instead of pkg/errors

This commit is contained in:
Till Faelligen 2020-11-09 17:21:43 +01:00
parent fbd3fc626b
commit 8012204000

View file

@ -21,8 +21,6 @@ import (
"fmt"
"time"
"github.com/pkg/errors"
eduAPI "github.com/matrix-org/dendrite/eduserver/api"
userapi "github.com/matrix-org/dendrite/userapi/api"
@ -623,7 +621,7 @@ func (d *Database) addEDUDeltaToResponse(
if fromPos.EDUPosition() != toPos.EDUPosition() {
// add typing deltas
if err := d.addTypingDeltaToResponse(fromPos, joinedRoomIDs, res); err != nil {
return errors.Wrap(err, "unable to apply typing delta to response")
return fmt.Errorf("unable to apply typing delta to response: %w")
}
}
@ -631,7 +629,7 @@ func (d *Database) addEDUDeltaToResponse(
if (fromPos.EDUPosition() == 0 && toPos.EDUPosition() == 0) ||
fromPos.EDUPosition() != toPos.EDUPosition() {
if err := d.addReceiptDeltaToResponse(fromPos, joinedRoomIDs, res); err != nil {
return errors.Wrap(err, "unable to apply receipts to response")
return fmt.Errorf("unable to apply receipts to response: %w")
}
}