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

Request: New bind property for route parameters #973

Merged
merged 2 commits into from
Jul 25, 2017

Conversation

goenning
Copy link
Contributor

This is a proposed solution for #972

Did I miss something? I'm not quite happy with bindRouteData, but I didn't find a way to get a map out of the Route parameters.

@codecov
Copy link

codecov bot commented Jul 21, 2017

Codecov Report

Merging #973 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #973      +/-   ##
==========================================
+ Coverage   76.66%   76.67%   +<.01%     
==========================================
  Files          27       27              
  Lines        2216     2229      +13     
==========================================
+ Hits         1699     1709      +10     
- Misses        396      398       +2     
- Partials      121      122       +1
Impacted Files Coverage Δ
bind.go 81.59% <100%> (-0.33%) ⬇️

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 0769b34...3f749ed. Read the comment docs.

bind.go Outdated
@@ -75,6 +78,19 @@ func (b *DefaultBinder) Bind(i interface{}, c Context) (err error) {
return
}

func (b *DefaultBinder) bindRouteData(ptr interface{}, c Context) error {
Copy link
Member

Choose a reason for hiding this comment

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

Just for consistency can we call it bindPathData()?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have renamed as suggested.

Copy link
Member

@vishr vishr left a comment

Choose a reason for hiding this comment

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

Please see inline comment.

@vishr vishr merged commit f8c3008 into labstack:master Jul 25, 2017
@vishr
Copy link
Member

vishr commented Jul 25, 2017

@goenning thanks for your contribution 🎉

@goenning goenning deleted the bind-route-params branch July 25, 2017 16:53
@vishr
Copy link
Member

vishr commented Aug 15, 2017

This has been reverted until we all address all the issues originated after this change #980 #989

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