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

Fix ToMap for tables in mixed-type arrays #453

Merged
merged 1 commit into from
Nov 15, 2020

Conversation

mstetson
Copy link
Contributor

@mstetson mstetson commented Nov 9, 2020

ToMap doesn't convert tables to maps if they're inline tables in a mixed-type array.

a = ["foo", { bar = "baz" }]

Before this change, ToMap will return a map where the second element of the array a will be a *toml.Tree instead of a map[string]interface{}.

@codecov
Copy link

codecov bot commented Nov 9, 2020

Codecov Report

Merging #453 (2479d40) into master (5b4e7e5) will increase coverage by 0.03%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #453      +/-   ##
==========================================
+ Coverage   93.57%   93.60%   +0.03%     
==========================================
  Files          10       10              
  Lines        2257     2268      +11     
==========================================
+ Hits         2112     2123      +11     
  Misses        105      105              
  Partials       40       40              
Impacted Files Coverage Δ
tomltree_write.go 94.80% <100.00%> (+0.19%) ⬆️

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 5b4e7e5...2479d40. Read the comment docs.

@pelletier
Copy link
Owner

Awesome! Thank you for fixing this!

@pelletier pelletier merged commit 1bd9461 into pelletier:master Nov 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants