-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Request: New bind property for route parameters #973
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
Conversation
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
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 { |
There was a problem hiding this comment.
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()
?
There was a problem hiding this comment.
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.
There was a problem hiding this 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.
@goenning thanks for your contribution 🎉 |
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.