Closed
Description
- With issues:
- Use the search tool before opening a new issue.
- Please provide source code and commit sha if you found a bug.
- Review existing issues and provide feedback or react to them.
Description
wildcard path param ,url not found
How to reproduce
package main
import (
"fmt"
"github.com/gin-gonic/gin"
)
func handler(c *gin.Context) {
fmt.Println(c.Params)
}
func main() {
g := gin.Default()
g.GET("/:resources/:name", handler)
g.GET("/:resources", handler)
g.GET("/namespaces/:namespace/:resources/:name", handler)
g.GET("/namespaces/:namespace/:resources", handler)
g.Run(":9090")
}
Actual result
$ curl http://localhost:9000/namespaces/apps
404 page not found
Environment
- go version: 1.16
- gin version (or commit ref): 1.7.2
- operating system: Ubuntu 20.04.2 LTS
Activity