How to support part of the pathinfo
For example, we want to rewrite /forum-{:id}.html to match the id from the part of the url.
i don't know how to do it.
:id was the named params.
if id = 4
request may like /forum-4.html
For reference: Spring framework has PathPattern very powerful
-
PathPattern Implementation https://github.com/spring-projects/spring-framework/blob/master/spring-web/src/main/java/org/springframework/web/util/pattern/PathPattern.java
-
Test cases https://github.com/spring-projects/spring-framework/blob/master/spring-web/src/test/java/org/springframework/web/util/pattern/PathPatternTests.java
you can use /forum-:id, but not through ps.ByName("id") get id, you can self parse id, like
id, err := strconv.Atoi("/forml-4"[len("/forml-"):])