Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove dependency on github.com/pkg/errors #11886

Merged
merged 1 commit into from
Jan 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ require (
github.com/mattn/go-zglob v0.0.4
github.com/olekukonko/tablewriter v0.0.5
github.com/patrickmn/go-cache v2.1.0+incompatible
github.com/pkg/errors v0.9.1
github.com/pkg/errors v0.9.1 // indirect
github.com/prometheus/client_golang v1.14.0
github.com/r3labs/diff v1.1.0
github.com/rs/cors v1.8.0 // indirect
Expand Down
3 changes: 1 addition & 2 deletions server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
netCtx "context"
"crypto/tls"
"errors"
"fmt"
goio "io"
"io/fs"
Expand Down Expand Up @@ -61,8 +62,6 @@ import (
accountpkg "github.com/argoproj/argo-cd/v2/pkg/apiclient/account"
applicationpkg "github.com/argoproj/argo-cd/v2/pkg/apiclient/application"

"github.com/pkg/errors"

applicationsetpkg "github.com/argoproj/argo-cd/v2/pkg/apiclient/applicationset"
certificatepkg "github.com/argoproj/argo-cd/v2/pkg/apiclient/certificate"
clusterpkg "github.com/argoproj/argo-cd/v2/pkg/apiclient/cluster"
Expand Down
3 changes: 1 addition & 2 deletions util/kube/portforwarder.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"net/http"
"os"

"github.com/pkg/errors"
corev1 "k8s.io/api/core/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/kubernetes"
Expand Down Expand Up @@ -68,7 +67,7 @@ func PortForward(targetPort int, namespace string, overrides *clientcmd.ConfigOv

transport, upgrader, err := spdy.RoundTripperFor(config)
if err != nil {
return -1, errors.Wrap(err, "Could not create round tripper")
return -1, fmt.Errorf("could not create round tripper: %w", err)
}
dialer := spdy.NewDialer(upgrader, &http.Client{Transport: transport}, "POST", url)

Expand Down
4 changes: 2 additions & 2 deletions util/kustomize/kustomize.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package kustomize

import (
"errors"
"fmt"
"net/url"
"os"
Expand All @@ -14,7 +15,6 @@ import (
"github.com/Masterminds/semver/v3"

"github.com/argoproj/gitops-engine/pkg/utils/kube"
"github.com/pkg/errors"
log "github.com/sirupsen/logrus"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"

Expand Down Expand Up @@ -258,7 +258,7 @@ func getSemver() (*semver.Version, error) {

// getSemverSafe returns parsed kustomize version;
// if version cannot be parsed assumes that "kustomize version" output format changed again
// and fallback to latest ( v99.99.99 )
// and fallback to latest ( v99.99.99 )
func getSemverSafe() *semver.Version {
if semVer == nil {
semVerLock.Lock()
Expand Down