forked from mirror/gin
Fix typos in RouterGroup method docs (#3302)
There were a number of spots referring to a variable named "handle" that should be "handlers".
This commit is contained in:
parent
fb13e822a4
commit
2ae6157049
|
@ -106,37 +106,37 @@ func (group *RouterGroup) Handle(httpMethod, relativePath string, handlers ...Ha
|
||||||
return group.handle(httpMethod, relativePath, handlers)
|
return group.handle(httpMethod, relativePath, handlers)
|
||||||
}
|
}
|
||||||
|
|
||||||
// POST is a shortcut for router.Handle("POST", path, handle).
|
// POST is a shortcut for router.Handle("POST", path, handlers).
|
||||||
func (group *RouterGroup) POST(relativePath string, handlers ...HandlerFunc) IRoutes {
|
func (group *RouterGroup) POST(relativePath string, handlers ...HandlerFunc) IRoutes {
|
||||||
return group.handle(http.MethodPost, relativePath, handlers)
|
return group.handle(http.MethodPost, relativePath, handlers)
|
||||||
}
|
}
|
||||||
|
|
||||||
// GET is a shortcut for router.Handle("GET", path, handle).
|
// GET is a shortcut for router.Handle("GET", path, handlers).
|
||||||
func (group *RouterGroup) GET(relativePath string, handlers ...HandlerFunc) IRoutes {
|
func (group *RouterGroup) GET(relativePath string, handlers ...HandlerFunc) IRoutes {
|
||||||
return group.handle(http.MethodGet, relativePath, handlers)
|
return group.handle(http.MethodGet, relativePath, handlers)
|
||||||
}
|
}
|
||||||
|
|
||||||
// DELETE is a shortcut for router.Handle("DELETE", path, handle).
|
// DELETE is a shortcut for router.Handle("DELETE", path, handlers).
|
||||||
func (group *RouterGroup) DELETE(relativePath string, handlers ...HandlerFunc) IRoutes {
|
func (group *RouterGroup) DELETE(relativePath string, handlers ...HandlerFunc) IRoutes {
|
||||||
return group.handle(http.MethodDelete, relativePath, handlers)
|
return group.handle(http.MethodDelete, relativePath, handlers)
|
||||||
}
|
}
|
||||||
|
|
||||||
// PATCH is a shortcut for router.Handle("PATCH", path, handle).
|
// PATCH is a shortcut for router.Handle("PATCH", path, handlers).
|
||||||
func (group *RouterGroup) PATCH(relativePath string, handlers ...HandlerFunc) IRoutes {
|
func (group *RouterGroup) PATCH(relativePath string, handlers ...HandlerFunc) IRoutes {
|
||||||
return group.handle(http.MethodPatch, relativePath, handlers)
|
return group.handle(http.MethodPatch, relativePath, handlers)
|
||||||
}
|
}
|
||||||
|
|
||||||
// PUT is a shortcut for router.Handle("PUT", path, handle).
|
// PUT is a shortcut for router.Handle("PUT", path, handlers).
|
||||||
func (group *RouterGroup) PUT(relativePath string, handlers ...HandlerFunc) IRoutes {
|
func (group *RouterGroup) PUT(relativePath string, handlers ...HandlerFunc) IRoutes {
|
||||||
return group.handle(http.MethodPut, relativePath, handlers)
|
return group.handle(http.MethodPut, relativePath, handlers)
|
||||||
}
|
}
|
||||||
|
|
||||||
// OPTIONS is a shortcut for router.Handle("OPTIONS", path, handle).
|
// OPTIONS is a shortcut for router.Handle("OPTIONS", path, handlers).
|
||||||
func (group *RouterGroup) OPTIONS(relativePath string, handlers ...HandlerFunc) IRoutes {
|
func (group *RouterGroup) OPTIONS(relativePath string, handlers ...HandlerFunc) IRoutes {
|
||||||
return group.handle(http.MethodOptions, relativePath, handlers)
|
return group.handle(http.MethodOptions, relativePath, handlers)
|
||||||
}
|
}
|
||||||
|
|
||||||
// HEAD is a shortcut for router.Handle("HEAD", path, handle).
|
// HEAD is a shortcut for router.Handle("HEAD", path, handlers).
|
||||||
func (group *RouterGroup) HEAD(relativePath string, handlers ...HandlerFunc) IRoutes {
|
func (group *RouterGroup) HEAD(relativePath string, handlers ...HandlerFunc) IRoutes {
|
||||||
return group.handle(http.MethodHead, relativePath, handlers)
|
return group.handle(http.MethodHead, relativePath, handlers)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue