Open zituocn opened 1 year ago
Strange usage, maybe you can write id := c.Param("id.htm")
Or you can control your route in middleware or function.
Routes should have unique properties
The router's properties are pretty unique. It just is not the properties we expect here 🙈
According to Gin's radix-tree router, a wild card starts with :
and ends at the next /
or at the end of the given string. In your example, the wild card is id.htm
and not id
.
I guess you expected the router to pars something like this:
/read_
:id
.htm
But as the wildcard ends with the next /
or end of the string. So it actually is:
/read_
:id.htm
Description
code:
can match the following requests:
Environment