We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug An empty input currently results in a <nil> result when unmarshaled into interface{}.
<nil>
interface{}
To Reproduce https://play.golang.org/p/qYCSR7Hrjc3
var v interface{} toml.Unmarshal([]byte(""), &v)
Expected behavior According to this toml-lang/toml issue, it should result in an empty map (BurntSushi returns an empty map[string]interface{}).
toml-lang/toml
map[string]interface{}
Versions
The text was updated successfully, but these errors were encountered:
Nice edge case, probably comes from the strategy of trying to allocate as little as necessary. Thanks!
Sorry, something went wrong.
unmarshal: empty document results in map
22848b4
Fixes #602
unmarshal: empty document results in map (#640)
64941b9
Fixed inhttps://github.com/pelletier/go-toml/commit/64941b99e2bfbaf6f1c1fcfefd51d055beaafcbf
No branches or pull requests
Describe the bug
An empty input currently results in a
<nil>
result when unmarshaled intointerface{}
.To Reproduce
https://play.golang.org/p/qYCSR7Hrjc3
Expected behavior
According to this
toml-lang/toml
issue, it should result in an empty map (BurntSushi returns an emptymap[string]interface{}
).Versions
The text was updated successfully, but these errors were encountered: