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
How can I get all param variables? #1816
Comments
Thanks for opening your first issue here! 🎉 Be sure to follow the issue template! If you need help or want to chat with us, join us on Discord https://gofiber.io/discord |
we do not have such a method, since we assumed that if the route itself is defined, you know the parameters you can still get the route from the context and there is a parameters node which contains all parameters in a slice |
Current I do like this: params := make(map[string][]string)
for _, param := range c.Route().Params {
params[param] = append(params[param], c.Params(param))
} |
@long2ice perhaps a new method in context worth ? |
Thanks for your kind replies! |
For example, if my url is /test/:param1/test2/:param2
Isn't there a function that returns all path variables including param1 and param2 in middleware?
(like url.Query())
What I expect is this.
-->
url : test/1/test2/2
function returns: param1:1, param2:2
The text was updated successfully, but these errors were encountered: