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 config for the gorestful middleware #150

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tekkamanendless
Copy link

One of the benefits of using gorestful is its fancy routes, which
let you specify "path parameters" such as "/users/{id}". This
change adds a "Config" structure for the gorestful middleware that
allows you to use the gorestful route path and not the actual
request path.

For backward compatibility, this introduces the "HandlerWithConfig"
function, and the existing "Handler" function calls "HandlerWithConfig"
with the default "Config".

The example has been updated to use "HandlerWithConfig".

One of the benefits of using gorestful is its fancy routes, which
let you specify "path parameters" such as "/users/{id}".  This
change adds a "Config" structure for the gorestful middleware that
allows you to use the gorestful route path and not the actual
request path.

For backward compatibility, this introduces the "HandlerWithConfig"
function, and the existing "Handler" function calls "HandlerWithConfig"
with the default "Config".

The example has been updated to use "HandlerWithConfig".
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

1 participant