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

add conversion for map to object #42

Merged
merged 1 commit into from Feb 19, 2020
Merged

add conversion for map to object #42

merged 1 commit into from Feb 19, 2020

Conversation

jbardin
Copy link
Contributor

@jbardin jbardin commented Feb 14, 2020

Allow conversions from maps to objects.

We return a conversion when the map element type con convert to all
possible attributes. The conversion itself will fail if the map contains
keys that are not valid attributes of that object type.

@codecov
Copy link

codecov bot commented Feb 14, 2020

Codecov Report

Merging #42 into master will increase coverage by 0.02%.
The diff coverage is 81.25%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #42      +/-   ##
==========================================
+ Coverage   69.57%   69.59%   +0.02%     
==========================================
  Files          78       78              
  Lines        6964     6996      +32     
==========================================
+ Hits         4845     4869      +24     
- Misses       1692     1698       +6     
- Partials      427      429       +2
Impacted Files Coverage Δ
cty/convert/conversion.go 82.29% <50%> (-1.41%) ⬇️
cty/convert/conversion_collection.go 83.33% <85.71%> (+0.4%) ⬆️
cty/convert/compare_types.go 97.61% <0%> (-2.39%) ⬇️

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 cbcef98...a5bce19. Read the comment docs.

We return a conversion when the map element type can convert to all
declared attributes.
@apparentlymart
Copy link
Collaborator

Thanks! I rebased this to apply to master without making go.mod invalid, but it's otherwise unchanged.

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.

None yet

2 participants