feat: add PATCH method to Kite and Group
- Add PATCH(path, handler, ...middleware) on Kite for top-level routes - Add PATCH(path, handler, ...middleware) on Group for nested routes
This commit is contained in:
4
group.go
4
group.go
@@ -61,6 +61,10 @@ func (g *Group) OPTIONS(path string, h Handler, mws ...Middleware) {
|
||||
g.handle(http.MethodOptions, path, h, mws...)
|
||||
}
|
||||
|
||||
func (g *Group) PATCH(path string, h Handler, mws ...Middleware) {
|
||||
g.handle(http.MethodPatch, path, h, mws...)
|
||||
}
|
||||
|
||||
func (g *Group) POST(path string, h Handler, mws ...Middleware) {
|
||||
g.handle(http.MethodPost, path, h, mws...)
|
||||
}
|
||||
|
||||
4
kite.go
4
kite.go
@@ -227,6 +227,10 @@ func (k *Kite) OPTIONS(path string, h Handler, mws ...Middleware) {
|
||||
k.handle(http.MethodOptions, path, h, mws...)
|
||||
}
|
||||
|
||||
func (k *Kite) PATCH(path string, h Handler, mws ...Middleware) {
|
||||
k.handle(http.MethodPatch, path, h, mws...)
|
||||
}
|
||||
|
||||
func (k *Kite) POST(path string, h Handler, mws ...Middleware) {
|
||||
k.handle(http.MethodPost, path, h, mws...)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user