From 5ff0e92ebaedbf605626ab39d306b806a0fd63cd Mon Sep 17 00:00:00 2001 From: Baiju Muthukadan Date: Tue, 15 Feb 2022 11:08:41 +0530 Subject: [PATCH] Remove the last usage of obsolete package The github.com/pkg/errors package is no more maintaned: https://github.com/pkg/errors/issues/245 Signed-off-by: Baiju Muthukadan --- go.mod | 1 - pkg/binding/annotationmapper.go | 4 +--- pkg/reconcile/pipeline/builder/pipeline_test.go | 3 ++- vendor/modules.txt | 1 - 4 files changed, 3 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index ff26f37ad3..328c9373c8 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,6 @@ require ( github.com/onsi/ginkgo v1.16.4 github.com/onsi/gomega v1.15.0 github.com/operator-framework/api v0.3.8 - github.com/pkg/errors v0.9.1 github.com/stretchr/testify v1.7.0 k8s.io/api v0.22.1 k8s.io/apiextensions-apiserver v0.22.1 diff --git a/pkg/binding/annotationmapper.go b/pkg/binding/annotationmapper.go index 91018f5069..20f839e70f 100644 --- a/pkg/binding/annotationmapper.go +++ b/pkg/binding/annotationmapper.go @@ -5,8 +5,6 @@ import ( "strings" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - - "github.com/pkg/errors" ) type UnstructuredResourceReader func(namespace string, name string) (*unstructured.Unstructured, error) @@ -92,7 +90,7 @@ func (m *annotationBackedDefinitionBuilder) Build() (Definition, error) { mod, err := newModel(m.value) if err != nil { - return nil, errors.Wrapf(err, "could not create binding model for annotation key %s and value %s", m.name, m.value) + return nil, fmt.Errorf("could not create binding model for annotation key %s and value %s: %w", m.name, m.value, err) } switch { diff --git a/pkg/reconcile/pipeline/builder/pipeline_test.go b/pkg/reconcile/pipeline/builder/pipeline_test.go index ecd6b0e1a9..967343c39d 100644 --- a/pkg/reconcile/pipeline/builder/pipeline_test.go +++ b/pkg/reconcile/pipeline/builder/pipeline_test.go @@ -1,9 +1,10 @@ package builder_test import ( + "errors" "fmt" + "github.com/golang/mock/gomock" - "github.com/pkg/errors" "github.com/redhat-developer/service-binding-operator/apis/binding/v1alpha1" "github.com/redhat-developer/service-binding-operator/pkg/reconcile/pipeline" "github.com/redhat-developer/service-binding-operator/pkg/reconcile/pipeline/builder" diff --git a/vendor/modules.txt b/vendor/modules.txt index 9cafd5f309..a7c450e3ff 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -128,7 +128,6 @@ github.com/operator-framework/api/pkg/lib/version github.com/operator-framework/api/pkg/operators github.com/operator-framework/api/pkg/operators/v1alpha1 # github.com/pkg/errors v0.9.1 -## explicit github.com/pkg/errors # github.com/pmezard/go-difflib v1.0.0 github.com/pmezard/go-difflib/difflib