From f43556693310691c7d61568fd2f1a3bb9064f279 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Thu, 10 Apr 2025 12:40:46 +0200 Subject: [PATCH] Migrate to github.com/go-viper/mapstructure/v2 The github.com/mitchellh/mapstructure package is archived and no longer receives updates[^1]. The "blessed" fork[^2] is github.com/go-viper/mapstructure. The API is the same, so nothing needs to be changed apart from the import path. [^1]: https://github.com/mitchellh/mapstructure/issues/349 [^2]: https://gist.github.com/mitchellh/90029601268e59a29e64e55bab1c5bdc Signed-off-by: Tobias Klauser --- format.go | 2 +- format_test.go | 2 +- go.mod | 2 +- go.sum | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/format.go b/format.go index 2c45cd2..75d4b60 100644 --- a/format.go +++ b/format.go @@ -23,7 +23,7 @@ import ( "time" "github.com/go-openapi/errors" - "github.com/mitchellh/mapstructure" + "github.com/go-viper/mapstructure/v2" ) // Default is the default formats registry diff --git a/format_test.go b/format_test.go index 65882b5..6693cc2 100644 --- a/format_test.go +++ b/format_test.go @@ -19,7 +19,7 @@ import ( "testing" "time" - "github.com/mitchellh/mapstructure" + "github.com/go-viper/mapstructure/v2" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/go.mod b/go.mod index 0197c5c..a5276b4 100644 --- a/go.mod +++ b/go.mod @@ -3,8 +3,8 @@ module github.com/go-openapi/strfmt require ( github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 github.com/go-openapi/errors v0.22.1 + github.com/go-viper/mapstructure/v2 v2.2.1 github.com/google/uuid v1.6.0 - github.com/mitchellh/mapstructure v1.5.0 github.com/oklog/ulid v1.3.1 github.com/stretchr/testify v1.10.0 go.mongodb.org/mongo-driver v1.17.3 diff --git a/go.sum b/go.sum index afc837e..701b0fa 100644 --- a/go.sum +++ b/go.sum @@ -4,12 +4,12 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/go-openapi/errors v0.22.1 h1:kslMRRnK7NCb/CvR1q1VWuEQCEIsBGn5GgKD9e+HYhU= github.com/go-openapi/errors v0.22.1/go.mod h1:+n/5UdIqdVnLIJ6Q9Se8HNGUXYaY6CN8ImWzfi/Gzp0= +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/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -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/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U=