Skip to content

Commit 368c8b6

Browse files
committed
chore: avoid including github.com/pkg/errors
as requsted in review
1 parent b2aab98 commit 368c8b6

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

go.mod

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ require (
1313
github.com/kong/go-kong v0.13.0
1414
github.com/lithammer/dedent v1.1.0
1515
github.com/mitchellh/mapstructure v1.3.1
16-
github.com/pkg/errors v0.9.1
1716
github.com/prometheus/client_golang v1.7.1
1817
github.com/sirupsen/logrus v1.6.0
1918
github.com/spf13/pflag v1.0.5

internal/ingress/utils/ingressapi.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package utils
33
import (
44
"fmt"
55

6-
"github.com/pkg/errors"
76
extensionsv1beta1 "k8s.io/api/extensions/v1beta1"
87
networkingv1 "k8s.io/api/networking/v1"
98
networkingv1beta1 "k8s.io/api/networking/v1beta1"
@@ -50,7 +49,7 @@ func NegotiateResourceAPI(client discovery.ServerResourcesInterface, kind string
5049
) (IngressAPI, error) {
5150
for _, candidate := range allowedVersions {
5251
if ok, err := serverHasGVK(client, candidate.String(), kind); err != nil {
53-
return OtherAPI, errors.Wrapf(err, "serverHasGVK(%v): ", candidate)
52+
return OtherAPI, err
5453
} else if ok {
5554
return candidate, nil
5655
}

internal/ingress/utils/ingressapi_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
package utils
22

33
import (
4+
"errors"
45
"testing"
56

6-
"github.com/pkg/errors"
77
"github.com/stretchr/testify/require"
88
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
99
"k8s.io/client-go/discovery"

0 commit comments

Comments
 (0)