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

Bascule Attributes should supported key path getters #52

Merged
merged 4 commits into from
Jan 29, 2020

Conversation

joe94
Copy link
Member

@joe94 joe94 commented Jan 27, 2020

This PR introduces breaking changes to the library to add support for getting values from a token attribute given a key path.

Todo:

  • Unit tests

Note: the reason why we need to do an additional casting error check is that viper does not provide it 😢 https://github.com/spf13/cast#usage

@codecov-io
Copy link

codecov-io commented Jan 27, 2020

Codecov Report

Merging #52 into master will decrease coverage by 0.26%.
The diff coverage is 74.73%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #52      +/-   ##
==========================================
- Coverage   76.33%   76.07%   -0.27%     
==========================================
  Files          25       25              
  Lines         731      815      +84     
==========================================
+ Hits          558      620      +62     
- Misses        155      167      +12     
- Partials       18       28      +10
Impacted Files Coverage Δ
checks.go 95.65% <100%> (-4.35%) ⬇️
basculehttp/tokenFactory.go 30.43% <33.33%> (ø) ⬆️
token.go 79.38% <77.27%> (-20.62%) ⬇️

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 24dca1c...220b5d6. Read the comment docs.

@joe94 joe94 self-assigned this Jan 28, 2020
@joe94 joe94 changed the title (Work in progress) 1st attempt for key path token attributes Bascule Attributes should supported key path getters Jan 28, 2020
Copy link
Contributor

@kristinapathak kristinapathak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding this - I can't wait to use it! 😄

Copy link
Contributor

@johnabass johnabass left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@joe94
Copy link
Member Author

joe94 commented Jan 29, 2020

fixes #51

@joe94 joe94 merged commit c31064f into master Jan 29, 2020
@joe94 joe94 deleted the feature/attributeGetter branch January 29, 2020 00:47
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.

4 participants