ivpusic / neo

Go Web Framework
http://ivpusic.github.io/neo/
MIT License
420 stars 43 forks source link

how to get wildcard param's value? #18

Closed butaixianran closed 8 years ago

butaixianran commented 8 years ago

We need something like this:

    app.Get("/path/:name/*", func(c *neo.Ctx) (int, error) {
        others := c.Req.Params("*")
        //do something
    })

How can I get the value of wildcard? Thanks

p.s. neo is great, it's exactly what we need, its router is also much easy to use then gin and echo. Thanks for this great job

butaixianran commented 8 years ago

I create a pull request to "ivpusic/urlregex" to support named wildcards, which also works for neo just fine.

ivpusic commented 8 years ago

Awesome! Thanks a lot for this. So far I didn't need this feature so it is missing right now. Check out comment I put on your pull request, so we can merge it.

ivpusic commented 8 years ago

https://github.com/ivpusic/urlregex/pull/1 merged. Thanks again.