From a8855974229f72fc847a290519c861bdc8c5fae0 Mon Sep 17 00:00:00 2001 From: Timo Riegebauer Date: Sat, 23 May 2026 18:38:38 +0200 Subject: [PATCH] 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 --- group.go | 4 ++++ kite.go | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/group.go b/group.go index 0db50f4..897b732 100644 --- a/group.go +++ b/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...) } diff --git a/kite.go b/kite.go index 5438b5f..434b000 100644 --- a/kite.go +++ b/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...) }