From 8c749cd6a481bc55b5ac21e74c68cac70036de19 Mon Sep 17 00:00:00 2001 From: James Sheppard Date: Sun, 7 May 2023 17:49:48 +0000 Subject: [PATCH] clean up error imports for registry pkg Signed-off-by: James Sheppard --- pkg/registry/client.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/registry/client.go b/pkg/registry/client.go index f9569b62b..5db56eb28 100644 --- a/pkg/registry/client.go +++ b/pkg/registry/client.go @@ -19,6 +19,7 @@ package registry // import "helm.sh/helm/v3/pkg/registry" import ( "context" "encoding/json" + "errors" "fmt" "io" "net/http" @@ -28,7 +29,6 @@ import ( "github.com/Masterminds/semver/v3" "github.com/containerd/containerd/remotes" ocispec "github.com/opencontainers/image-spec/specs-go/v1" - "github.com/pkg/errors" "oras.land/oras-go/pkg/auth" dockerauth "oras.land/oras-go/pkg/auth/docker" "oras.land/oras-go/pkg/content" @@ -392,7 +392,7 @@ func (c *Client) Pull(ref string, options ...PullOption) (*PullResult, error) { } var getManifestErr error if _, manifestData, ok := memoryStore.Get(manifest); !ok { - getManifestErr = errors.Errorf("Unable to retrieve blob with digest %s", manifest.Digest) + getManifestErr = fmt.Errorf("Unable to retrieve blob with digest %s", manifest.Digest) } else { result.Manifest.Data = manifestData } @@ -401,7 +401,7 @@ func (c *Client) Pull(ref string, options ...PullOption) (*PullResult, error) { } var getConfigDescriptorErr error if _, configData, ok := memoryStore.Get(*configDescriptor); !ok { - getConfigDescriptorErr = errors.Errorf("Unable to retrieve blob with digest %s", configDescriptor.Digest) + getConfigDescriptorErr = fmt.Errorf("Unable to retrieve blob with digest %s", configDescriptor.Digest) } else { result.Config.Data = configData var meta *chart.Metadata @@ -416,7 +416,7 @@ func (c *Client) Pull(ref string, options ...PullOption) (*PullResult, error) { if operation.withChart { var getChartDescriptorErr error if _, chartData, ok := memoryStore.Get(*chartDescriptor); !ok { - getChartDescriptorErr = errors.Errorf("Unable to retrieve blob with digest %s", chartDescriptor.Digest) + getChartDescriptorErr = fmt.Errorf("Unable to retrieve blob with digest %s", chartDescriptor.Digest) } else { result.Chart.Data = chartData result.Chart.Digest = chartDescriptor.Digest.String() @@ -429,7 +429,7 @@ func (c *Client) Pull(ref string, options ...PullOption) (*PullResult, error) { if operation.withProv && !provMissing { var getProvDescriptorErr error if _, provData, ok := memoryStore.Get(*provDescriptor); !ok { - getProvDescriptorErr = errors.Errorf("Unable to retrieve blob with digest %s", provDescriptor.Digest) + getProvDescriptorErr = fmt.Errorf("Unable to retrieve blob with digest %s", provDescriptor.Digest) } else { result.Prov.Data = provData result.Prov.Digest = provDescriptor.Digest.String()