-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Closed
Labels
type/bugFound something you weren't expecting? Report it here!Found something you weren't expecting? Report it here!
Description
Cross posted from #2767
package main
import "github.com/gin-gonic/gin"
func main() {
r := gin.Default()
r.GET("/aa/:customer", newHandler("/aa/:customer"))
r.GET("/aa/:customer/files/:file", newHandler("/aa/:customer/files/:file"))
r.Run()
}
func newHandler(t string) func(c *gin.Context) {
return func(c *gin.Context) {
c.JSON(200, gin.H{
"message": t,
})
}
}For the above code example, the request results are:
/aa/1/files/aa => /aa/:customer/files/:file
/aa/1/files/ => /aa/:customer
/aa/1/files => 404
/aa/1 => /aa/:customer
Metadata
Metadata
Assignees
Labels
type/bugFound something you weren't expecting? Report it here!Found something you weren't expecting? Report it here!