mapstructure
                                
                                 mapstructure copied to clipboard
                                
                                    mapstructure copied to clipboard
                            
                            
                            
                        Platform-specific behavior when decoding a float value into a uint field
https://github.com/mitchellh/mapstructure/blob/4664f9ee512b4dfa71b501c4960d469c205b2cf1/mapstructure.go#L657
Should be val.SetUint(uint64(int64(f))), because https://golang.org/ref/spec#Conversions says:
In all non-constant conversions involving floating-point or complex values, if the result type cannot represent the value the conversion succeeds but the result value is implementation-dependent.
This violates the principle of least astonishment (at least) when trying to convert small negative floats to uint fields. (The way the values are converted are actually different, e. g. on ARM vs. Mac.
I'm good with this. Is there a test case that can be written (even if it only passes/fails on certain platforms/architectures) that we can have to prevent regressing this?