mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
add patch method to router.
This commit is contained in:
parent
149d74150b
commit
f447cabe2e
@ -48,6 +48,10 @@ func (r *router) Put(pattern string, fn types.RouterHandler) {
|
||||
r.chi.Put(pattern, routeHandler(fn))
|
||||
}
|
||||
|
||||
func (r *router) Patch(pattern string, fn types.RouterHandler) {
|
||||
r.chi.Patch(pattern, routeHandler(fn))
|
||||
}
|
||||
|
||||
func (r *router) Delete(pattern string, fn types.RouterHandler) {
|
||||
r.chi.Delete(pattern, routeHandler(fn))
|
||||
}
|
||||
|
@ -14,6 +14,7 @@ type Router interface {
|
||||
Get(pattern string, fn RouterHandler)
|
||||
Post(pattern string, fn RouterHandler)
|
||||
Put(pattern string, fn RouterHandler)
|
||||
Patch(pattern string, fn RouterHandler)
|
||||
Delete(pattern string, fn RouterHandler)
|
||||
With(fn MiddlewareHandler) Router
|
||||
WithBypass(fn func(next http.Handler) http.Handler) Router
|
||||
|
Loading…
Reference in New Issue
Block a user