From fe11db6cd3095109715aa01135b4d9eeb7986073 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Mon, 16 Dec 2024 07:41:49 +0100 Subject: [PATCH] Replace discontinued mitchellh/mapstructure by maintained fork (#4573) --- cli/output/table.go | 2 +- go.mod | 2 +- go.sum | 4 ++-- pipeline/backend/docker/backend_options.go | 2 +- pipeline/backend/kubernetes/backend_options.go | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cli/output/table.go b/cli/output/table.go index a2b9a87c1..9fff467df 100644 --- a/cli/output/table.go +++ b/cli/output/table.go @@ -9,7 +9,7 @@ import ( "text/tabwriter" "unicode" - "github.com/mitchellh/mapstructure" + "github.com/go-viper/mapstructure/v2" ) // NewTable creates a new Table. diff --git a/go.mod b/go.mod index 78142519f..9e74817bc 100644 --- a/go.mod +++ b/go.mod @@ -30,6 +30,7 @@ require ( github.com/gin-gonic/gin v1.10.0 github.com/gitsight/go-vcsurl v1.0.1 github.com/go-sql-driver/mysql v1.8.1 + github.com/go-viper/mapstructure/v2 v2.2.1 github.com/golang-jwt/jwt/v5 v5.2.1 github.com/google/go-github/v67 v67.0.0 github.com/google/tink/go v1.7.0 @@ -41,7 +42,6 @@ require ( github.com/kinbiko/jsonassert v1.2.0 github.com/lib/pq v1.10.9 github.com/mattn/go-sqlite3 v1.14.24 - github.com/mitchellh/mapstructure v1.5.0 github.com/moby/moby v27.4.0+incompatible github.com/moby/term v0.5.0 github.com/muesli/termenv v0.15.3-0.20241212154518-8c990cd6cf4b diff --git a/go.sum b/go.sum index 377d0e7ba..a00ec6510 100644 --- a/go.sum +++ b/go.sum @@ -189,6 +189,8 @@ github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1v github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= github.com/go-test/deep v1.0.8 h1:TDsG77qcSprGbC6vTN8OuXp5g+J+b5Pcguhf7Zt61VM= github.com/go-test/deep v1.0.8/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= +github.com/go-viper/mapstructure/v2 v2.2.1 h1:ZAaOCxANMuZx5RCeg0mBdEZk7DZasvvZIxtHqx8aGss= +github.com/go-viper/mapstructure/v2 v2.2.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/goccy/go-json v0.8.1/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/goccy/go-json v0.10.3 h1:KZ5WoDbxAIgm2HNbYckL0se1fHD6rz5j4ywS6ebzDqA= @@ -392,8 +394,6 @@ github.com/mattn/go-sqlite3 v1.14.24 h1:tpSp2G2KyMnnQu99ngJ47EIkWVmliIizyZBfPrBW github.com/mattn/go-sqlite3 v1.14.24/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y= github.com/mitchellh/hashstructure/v2 v2.0.2 h1:vGKWl0YJqUNxE8d+h8f6NJLcCJrgbhC4NcD46KavDd4= github.com/mitchellh/hashstructure/v2 v2.0.2/go.mod h1:MG3aRVU/N29oo/V/IhBX8GR/zz4kQkprJgF2EVszyDE= -github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= -github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= github.com/moby/moby v27.4.0+incompatible h1:jGXXZCMAmFZS9pKsQqUt9yAPHOC450PM9lbQYPSQnuc= diff --git a/pipeline/backend/docker/backend_options.go b/pipeline/backend/docker/backend_options.go index 70dac666b..14aece0f3 100644 --- a/pipeline/backend/docker/backend_options.go +++ b/pipeline/backend/docker/backend_options.go @@ -1,7 +1,7 @@ package docker import ( - "github.com/mitchellh/mapstructure" + "github.com/go-viper/mapstructure/v2" backend "go.woodpecker-ci.org/woodpecker/v2/pipeline/backend/types" ) diff --git a/pipeline/backend/kubernetes/backend_options.go b/pipeline/backend/kubernetes/backend_options.go index 1d5fd6caa..ee2310be8 100644 --- a/pipeline/backend/kubernetes/backend_options.go +++ b/pipeline/backend/kubernetes/backend_options.go @@ -1,7 +1,7 @@ package kubernetes import ( - "github.com/mitchellh/mapstructure" + "github.com/go-viper/mapstructure/v2" backend "go.woodpecker-ci.org/woodpecker/v2/pipeline/backend/types" )