multi: use the "errors" package everywhere

Replace all usages of the "github.com/go-errors/errors" and
"github.com/pkg/errors" packages with the standard lib's "errors"
package. This ensures that error wrapping and `errors.Is` checks will
work as expected.
This commit is contained in:
Elle Mouton
2025-06-30 08:46:50 +02:00
parent 5f961e4349
commit 8cf567b948
44 changed files with 114 additions and 109 deletions

View File

@@ -1,6 +1,8 @@
package graph
import "github.com/go-errors/errors"
import (
"fmt"
)
// ErrorCode is used to represent the various errors that can occur within this
// package.
@@ -21,7 +23,7 @@ const (
// this structure carries additional information about error code in order to
// be able distinguish errors outside of the current package.
type Error struct {
err *errors.Error
err error
code ErrorCode
}
@@ -39,7 +41,7 @@ var _ error = (*Error)(nil)
func NewErrf(code ErrorCode, format string, a ...interface{}) *Error {
return &Error{
code: code,
err: errors.Errorf(format, a...),
err: fmt.Errorf(format, a...),
}
}