Skip to content
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

Marshal into empty interface{} #433

Merged
merged 1 commit into from
Sep 11, 2020
Merged

Marshal into empty interface{} #433

merged 1 commit into from
Sep 11, 2020

Conversation

pelletier
Copy link
Owner

Allows to marshal a TOML document into an empty interface{}, resulting
in a map[string]interface{}.

Fixes #432

cc @moorereason

Allows to marshal a TOML document into an empty `interface{}`, resulting
in a `map[string]interface{}`.

Fixes #432
@codecov
Copy link

codecov bot commented Sep 11, 2020

Codecov Report

Merging #433 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #433   +/-   ##
=======================================
  Coverage   93.91%   93.92%           
=======================================
  Files          10       10           
  Lines        2433     2435    +2     
=======================================
+ Hits         2285     2287    +2     
  Misses        107      107           
  Partials       41       41           
Impacted Files Coverage Δ
marshal.go 96.29% <100.00%> (+0.01%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 661484a...e998d3e. Read the comment docs.

@moorereason
Copy link
Contributor

Wow. So simple. Works great. Only had to change the import path to switch from BurntSushi1. 🏆

1 Although, some of our marshaling tests are not expecting inline tables, but I'll investigate that issue separately.

@pelletier pelletier merged commit b76eb62 into master Sep 11, 2020
@pelletier pelletier deleted the issue432 branch September 11, 2020 14:04
@pelletier pelletier added the feature Issue asking for a new feature in go-toml. label Sep 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Issue asking for a new feature in go-toml.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support Unmarshal into empty interface{}
2 participants