From aef25163e2e6a7c0a28d9691eda6c56a8a648777 Mon Sep 17 00:00:00 2001 From: Andrew Keesler Date: Thu, 15 Oct 2020 07:50:53 -0400 Subject: [PATCH] Get rid of an extra dependency from c030551 I brought this over because I copied code from work in flight on another branch. But now the other branch doesn't use this package. No use bringing on another dependency if we can avoid it. Signed-off-by: Andrew Keesler --- go.mod | 1 - test/library/client.go | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/go.mod b/go.mod index eb66e921..6adfc17b 100644 --- a/go.mod +++ b/go.mod @@ -14,7 +14,6 @@ require ( github.com/golangci/golangci-lint v1.31.0 github.com/google/go-cmp v0.5.2 github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4 - github.com/pkg/errors v0.9.1 github.com/sclevine/agouti v3.0.0+incompatible github.com/sclevine/spec v1.4.0 github.com/spf13/cobra v1.0.0 diff --git a/test/library/client.go b/test/library/client.go index 6ecc0ce8..7460526a 100644 --- a/test/library/client.go +++ b/test/library/client.go @@ -14,7 +14,6 @@ import ( "testing" "time" - "github.com/pkg/errors" "github.com/stretchr/testify/require" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -201,7 +200,7 @@ func CreateTestOIDCProvider(ctx context.Context, t *testing.T) *configv1alpha1.O func randomIssuer() (string, error) { var buf [8]byte if _, err := io.ReadFull(rand.Reader, buf[:]); err != nil { - return "", errors.WithMessage(err, "could not generate random state") + return "", fmt.Errorf("could not generate random state: %w", err) } return fmt.Sprintf("http://test-issuer-%s.pinniped.dev", hex.EncodeToString(buf[:])), nil }