gin icon indicating copy to clipboard operation
gin copied to clipboard

Fix: 404 bug with param

Open StephanoGeorge opened this issue 1 year ago • 1 comments

Code to reproduce the bug:

package main

import "github.com/gin-gonic/gin"

func main() {
	router := gin.Default()
	router.GET("/user/:id/posts", func(c *gin.Context) { c.Status(200) })
	router.GET("/:general/root", func(c *gin.Context) { c.Status(200) })
	router.Run()
}
curl http://localhost:8080/user/root
404 page not found

When I tried to run github actions in my repo, codecov reported "decrease coverage by 0.01%", because of context.go, but later, codecov said "decrease coverage by 0.00%" and removed context.go in table, I don't know why, I didn't change it.

StephanoGeorge avatar Aug 17 '22 05:08 StephanoGeorge