From 362f75b04df0a6a349646615a300925fb27fe5f0 Mon Sep 17 00:00:00 2001 From: Matthieu MOREL Date: Fri, 20 Dec 2024 12:05:11 +0100 Subject: [PATCH] chore: use dario.cat/mergo instead of github.com/imdario/mergo Signed-off-by: Matthieu MOREL --- .golangci.yaml | 4 ++++ applicationset/generators/generator_spec_processor.go | 2 +- applicationset/generators/matrix.go | 2 +- applicationset/generators/merge.go | 2 +- controller/state_test.go | 2 +- go.mod | 4 ++-- 6 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.golangci.yaml b/.golangci.yaml index ad92622481dbc6..feb434877c2c29 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -45,6 +45,10 @@ linters-settings: gomodguard: blocked: modules: + - github.com/imdario/mergo: + recommendations: + - dario.cat/mergo + reason: "`github.com/imdario/mergo` has been renamed." - github.com/pkg/errors: recommendations: - errors diff --git a/applicationset/generators/generator_spec_processor.go b/applicationset/generators/generator_spec_processor.go index 25e6b138da7491..195a7558b351ae 100644 --- a/applicationset/generators/generator_spec_processor.go +++ b/applicationset/generators/generator_spec_processor.go @@ -13,7 +13,7 @@ import ( argoprojiov1alpha1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1" - "github.com/imdario/mergo" + "dario.cat/mergo" log "github.com/sirupsen/logrus" ) diff --git a/applicationset/generators/matrix.go b/applicationset/generators/matrix.go index 80b0d8a7fc0525..472152295033e3 100644 --- a/applicationset/generators/matrix.go +++ b/applicationset/generators/matrix.go @@ -5,7 +5,7 @@ import ( "fmt" "time" - "github.com/imdario/mergo" + "dario.cat/mergo" "sigs.k8s.io/controller-runtime/pkg/client" "github.com/argoproj/argo-cd/v2/applicationset/utils" diff --git a/applicationset/generators/merge.go b/applicationset/generators/merge.go index a7de3a1f6ab4a9..67db0c5df32eb9 100644 --- a/applicationset/generators/merge.go +++ b/applicationset/generators/merge.go @@ -6,7 +6,7 @@ import ( "fmt" "time" - "github.com/imdario/mergo" + "dario.cat/mergo" "sigs.k8s.io/controller-runtime/pkg/client" "github.com/argoproj/argo-cd/v2/applicationset/utils" diff --git a/controller/state_test.go b/controller/state_test.go index 9a410992366f50..49c60db9a03978 100644 --- a/controller/state_test.go +++ b/controller/state_test.go @@ -7,11 +7,11 @@ import ( "testing" "time" + "dario.cat/mergo" "github.com/argoproj/gitops-engine/pkg/health" synccommon "github.com/argoproj/gitops-engine/pkg/sync/common" "github.com/argoproj/gitops-engine/pkg/utils/kube" . "github.com/argoproj/gitops-engine/pkg/utils/testing" - "github.com/imdario/mergo" "github.com/sirupsen/logrus" logrustest "github.com/sirupsen/logrus/hooks/test" "github.com/stretchr/testify/assert" diff --git a/go.mod b/go.mod index 2a8a1b1d6bee87..8ea57d308d0ebd 100644 --- a/go.mod +++ b/go.mod @@ -4,6 +4,7 @@ go 1.22.0 require ( code.gitea.io/sdk/gitea v0.19.0 + dario.cat/mergo v1.0.1 github.com/Azure/kubelogin v0.1.6 github.com/Masterminds/semver/v3 v3.3.1 github.com/Masterminds/sprig/v3 v3.3.0 @@ -54,7 +55,6 @@ require ( github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/hashicorp/go-retryablehttp v0.7.7 - github.com/imdario/mergo v0.3.16 github.com/improbable-eng/grpc-web v0.15.0 github.com/itchyny/gojq v0.12.17 github.com/jeremywohl/flatten v1.0.1 @@ -113,7 +113,6 @@ require ( ) require ( - dario.cat/mergo v1.0.1 // indirect github.com/Azure/azure-sdk-for-go/sdk/azcore v1.14.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.8.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0 // indirect @@ -142,6 +141,7 @@ require ( github.com/google/s2a-go v0.1.7 // indirect github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect github.com/googleapis/gax-go/v2 v2.12.3 // indirect + github.com/imdario/mergo v0.3.16 // indirect github.com/kylelemons/godebug v1.1.0 // indirect github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect