From abe5b0a00f720a7be702aaded6df1a946ce537bc Mon Sep 17 00:00:00 2001 From: Fernandez Ludovic Date: Tue, 30 Jan 2024 18:42:01 +0100 Subject: [PATCH] chore: replace mitchellh/mapstructure by go-viper/mapstructure/v2 --- go.mod | 3 ++- go.sum | 2 ++ pkg/config/reader.go | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index 16c66284ab11..78ea1a975e87 100644 --- a/go.mod +++ b/go.mod @@ -38,6 +38,7 @@ require ( github.com/fzipp/gocyclo v0.6.0 github.com/ghostiam/protogetter v0.3.4 github.com/go-critic/go-critic v0.11.0 + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 github.com/go-xmlfmt/xmlfmt v1.1.2 github.com/gofrs/flock v0.8.1 github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2 @@ -77,7 +78,6 @@ require ( github.com/mgechev/revive v1.3.6 github.com/mitchellh/go-homedir v1.1.0 github.com/mitchellh/go-ps v1.0.0 - github.com/mitchellh/mapstructure v1.5.0 github.com/moricho/tparallel v0.3.1 github.com/nakabonne/nestif v0.3.1 github.com/nishanths/exhaustive v0.12.0 @@ -162,6 +162,7 @@ require ( github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-runewidth v0.0.9 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect + github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/pelletier/go-toml v1.9.5 // indirect github.com/pelletier/go-toml/v2 v2.0.5 // indirect diff --git a/go.sum b/go.sum index 8f595d6d3b6c..5bbde213c5cc 100644 --- a/go.sum +++ b/go.sum @@ -178,6 +178,8 @@ github.com/go-toolsmith/strparse v1.1.0 h1:GAioeZUK9TGxnLS+qfdqNbA4z0SSm5zVNtCQi github.com/go-toolsmith/strparse v1.1.0/go.mod h1:7ksGy58fsaQkGQlY8WVoBFNyEPMGuJin1rfoPS4lBSQ= github.com/go-toolsmith/typep v1.1.0 h1:fIRYDyF+JywLfqzyhdiHzRop/GQDxxNhLGQ6gFUNHus= github.com/go-toolsmith/typep v1.1.0/go.mod h1:fVIw+7zjdsMxDA3ITWnH1yOiw1rnTQKCsF/sk2H/qig= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/go-xmlfmt/xmlfmt v1.1.2 h1:Nea7b4icn8s57fTx1M5AI4qQT5HEM3rVUO8MuE6g80U= github.com/go-xmlfmt/xmlfmt v1.1.2/go.mod h1:aUCEOzzezBEjDBbFBoSiya/gduyIiWYRP6CnSFIV8AM= github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= diff --git a/pkg/config/reader.go b/pkg/config/reader.go index a7a1af392a1e..1e5e0daffaf6 100644 --- a/pkg/config/reader.go +++ b/pkg/config/reader.go @@ -7,8 +7,8 @@ import ( "path/filepath" "strings" + "github.com/go-viper/mapstructure/v2" "github.com/mitchellh/go-homedir" - "github.com/mitchellh/mapstructure" "github.com/spf13/viper" "golang.org/x/exp/slices"