Add and fix the explanation of HandleContext
(#1371)
Reference this issue #1323 1. There isn't any eg about `HandleContext` 2. The `c.Request.Path` of `HandleContext` Comment is not right Based on the above two points, I pull this request. If you think it's unnecessary, I will close this. Thx.
This commit is contained in:
2
gin.go
2
gin.go
@ -329,7 +329,7 @@ func (engine *Engine) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
||||
}
|
||||
|
||||
// HandleContext re-enter a context that has been rewritten.
|
||||
// This can be done by setting c.Request.Path to your new target.
|
||||
// This can be done by setting c.Request.URL.Path to your new target.
|
||||
// Disclaimer: You can loop yourself to death with this, use wisely.
|
||||
func (engine *Engine) HandleContext(c *Context) {
|
||||
c.reset()
|
||||
|
Reference in New Issue
Block a user