mapstructure icon indicating copy to clipboard operation
mapstructure copied to clipboard

decodeMapFromSlice should ignore ZeroFields when not first element

Open timestee opened this issue 3 years ago • 0 comments

Thanks for this project, I've had a config file merge and load implementation using this project, and got a wired problem: https://github.com/sandwich-go/xconf/issues/6

https://github.com/mitchellh/mapstructure/blob/b9b99d7d59762a5b2a43df840adc318b2fa229ee/mapstructure.go#L823-L830 Should decodeMapFromSlice ignore ZeroFields when i != 0 ? Otherwise, the merged map will be clean again.

timestee avatar Mar 11 '22 06:03 timestee