can I use goroutione like:
router := gin.Default()
go router.POST("test", func(c *gin.Context) {
......
})
What do you want? gin is based on net/http package, and that serves each request by an individual goroutine. You do not need to worry about it.
Maybe you should see https://github.com/gin-gonic/gin#goroutines-inside-a-middleware firstly.
gin only focuses on control layer,which only deals with message from a client,and its reply,learn goroutine you should learn go basic grammar,and basicly like:
go func(){
fmt.Println("I'm a new routine")
}()
closing.
Most helpful comment
What do you want? gin is based on
net/httppackage, and that serves each request by an individual goroutine. You do not need to worry about it.