静态URL路径是否在labstack / echo中的参数之后有效

I’m chasing an odd pattern matching issue in labstack/echo and would like your thoughts.

Would the route

/first/:parameter/second

match the url http://hostname/first or http://hostname/first/ ?

What about /first/:parameter1/second/:parameter2/:parameter3/third/ ?

To my eye, they should not match the simple urls, but they appear to be. Is that desired behavior? Has anyone followed a parameter with a static in the url pattern?

In Echo your routes need to be in an order to not match. See the Routing Guide here and look for Path Matching Order

https://echo.labstack.com/guide/routing

Switch around your routes so your /first/:parameter/second doesn't match /first/:parameter1/second/:parameter2/:parameter3/third/