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 committed 2025-06-30 09:46:55 +02:00
1 parent 5f961e4349
commit 8cf567b948
44 files changed
+114 -109

No files matched your search

+5 -3
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...),
}
}