Closed thaJeztah closed 4 months ago
Nice! I was worried with this dependency being unmaintained.
That being said, with compose-go to be able to process most of the parse/interpolate/merge process in plain yaml, I think we could eventually get rid of this library by marshaling back the processed compose model into yaml and load it into go structs with a plain yaml.Unmarshal
. Doing so we would have a more explicit "pre-processing" phase (shared with docker compose config
) then load into go structs, which should be considered an "implementation detail"
That being said, with compose-go to be able to process most of the parse/interpolate/merge process in plain yaml, I think we could eventually get rid of this library
I haven't looked closely where it's all used, but yes, if we can get rid of a dependency altogether, that's always good!
I think I noticed this one being mentioned when Mitchell announced he'd be deprecating various of his repositories, and I had a draft in docker/cli for some time. Now that the fork did a v2.0.0 (non-beta) release, I went looking where else it was used, and found it was used here :smile:
github.com/mitchellh/mapstructure will no longer be maintained by the author, and github.com/go-viper/mapstructure is nominated as the endorsed fork.
Breaking changes
Error is removed in favor of errors.Join (backported from Go 1.20 to preserve compatibility with earlier versions)
What's Changed