News for hackers. Stuff that matters.
Re:Better HTTP server routing in Go 1.22 by superb_dev on Monday October 16, 2023 @01:48PM (#37903505)
The two routes `/foo/bar` and `/foo/*` are not ambiguous and would be allowed by the router
Re:Better HTTP server routing in Go 1.22 by danpalmer on Monday October 16, 2023 @03:58PM (#37905571)
Are they? It seems that the latter matches the former. i.e. for the path `/foo/bar` there are 2 matching routes. One must take precedence, but this router doesn't appear to allow that.

This may just be a syntax thing, I was being loose with syntax, and meant that the `*` would match anything for the purposes of this example.

Re:Better HTTP server routing in Go 1.22 by pipe01 on Wednesday October 18, 2023 @02:22AM (#37925394)
It does allow that, the one without wildcards is more specific so it'll pick that one