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

Enable parameters in group prefixes #1

Open
tmus opened this issue Dec 19, 2022 · 0 comments
Open

Enable parameters in group prefixes #1

tmus opened this issue Dec 19, 2022 · 0 comments

Comments

@tmus
Copy link
Member

tmus commented Dec 19, 2022

Should be able to register a group that contains a parameter inside the prefix. For example:

r.Group(
    router.Get("example/{two}", func(r *http.Request) string {
        return fmt.Sprintf("%s and %s", r.Form.Get("one"), r.Form.Get("two"))
    },
).Prefix("group/{one}")

Registering the above route should enable this request and response:

GET /group/1/example/2
1 and 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant