remove direct dependency on github/pkg/errors (#4970)

This commit is contained in:
Cailyn
2023-01-13 13:52:25 -05:00
committed by GitHub
parent 2b7eb6d92a
commit 8ab4b8d167
38 changed files with 137 additions and 143 deletions

View File

@@ -7,7 +7,7 @@ import (
"fmt"
"time"
"github.com/pkg/errors"
"sigs.k8s.io/kustomize/kyaml/errors"
)
type errTimeOut struct {
@@ -24,13 +24,6 @@ func (e errTimeOut) Error() string {
}
func IsErrTimeout(err error) bool {
if err == nil {
return false
}
_, ok := err.(errTimeOut)
if ok {
return true
}
_, ok = errors.Cause(err).(errTimeOut)
return ok
e := &errTimeOut{}
return errors.As(err, &e)
}