Skip to content

Migrate to github.com/go-viper/mapstructure/v2 #157

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

Merged
merged 1 commit into from
Apr 10, 2025

Conversation

tklauser
Copy link
Contributor

The github.com/mitchellh/mapstructure package is archived and no longer receives updates1. The "blessed" fork2 is
github.com/go-viper/mapstructure. The API is the same, so nothing needs to be changed apart from the import path.

Footnotes

  1. https://github.com/mitchellh/mapstructure/issues/349

  2. https://gist.github.com/mitchellh/90029601268e59a29e64e55bab1c5bdc

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]: mitchellh/mapstructure#349
[^2]: https://gist.github.com/mitchellh/90029601268e59a29e64e55bab1c5bdc

Signed-off-by: Tobias Klauser <[email protected]>
@fredbi
Copy link
Member

fredbi commented Apr 10, 2025

Thanks. If I remember correctly we have this dependency in other repos for go-openapi and go-swagger. Have to check

Copy link

codecov bot commented Apr 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.87%. Comparing base (3dbbafa) to head (f435566).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #157   +/-   ##
=======================================
  Coverage   82.87%   82.87%           
=======================================
  Files          13       13           
  Lines        2178     2178           
=======================================
  Hits         1805     1805           
  Misses        295      295           
  Partials       78       78           
Flag Coverage Δ
oldstable-macos-latest 82.87% <ø> (ø)
oldstable-ubuntu-latest 82.87% <ø> (ø)
oldstable-windows-latest 82.87% <ø> (ø)
stable-macos-latest 82.87% <ø> (ø)
stable-ubuntu-latest 82.87% <ø> (ø)
stable-windows-latest 82.87% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@fredbi fredbi merged commit fb8869b into go-openapi:master Apr 10, 2025
11 checks passed
@tklauser
Copy link
Contributor Author

Thanks. If I remember correctly we have this dependency in other repos for go-openapi and go-swagger. Have to check

The only other use I could find in these projects (according to https://pkg.go.dev/github.com/mitchellh/mapstructure?tab=importedby) was in github.com/go-swagger/go-swagger. Opened go-swagger/go-swagger#3186 to migrate the package there as well.

@tklauser tklauser deleted the mapstructure-migrate branch April 10, 2025 13:11
dolmen added a commit to dolmen-go/haproxytech.client-native.fork that referenced this pull request May 15, 2025
Replace github.com/mitchellh/mapstructure with github.com/go-viper/mapstructure/v2.

Rationale:

Module github.com/mitchellh/mapstructure isn't supported anymore.
Announcement: https://gist.github.com/mitchellh/90029601268e59a29e64e55bab1c5bdc
The blessed fork is at github.com/go-viper/mapstructure/v2.

Note: github.com/mitchellh/mapstructure is still referenced in
dependencies of go-openapi packages, but this is already being fixed (see
go-openapi/strfmt#157 ) and will be released
with the next github.com/go-openapi/strfmt.

Signed-off-by: Olivier Mengué <[email protected]>
mjuraga pushed a commit to haproxytech/client-native that referenced this pull request May 15, 2025
Replace github.com/mitchellh/mapstructure with github.com/go-viper/mapstructure/v2.

Rationale:

Module github.com/mitchellh/mapstructure isn't supported anymore.
Announcement: https://gist.github.com/mitchellh/90029601268e59a29e64e55bab1c5bdc
The blessed fork is at github.com/go-viper/mapstructure/v2.

Note: github.com/mitchellh/mapstructure is still referenced in
dependencies of go-openapi packages, but this is already being fixed (see
go-openapi/strfmt#157 ) and will be released
with the next github.com/go-openapi/strfmt.

Signed-off-by: Olivier Mengué <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants