From 3f53ba50f2e562b5a2bc97442266b5e7acd585eb Mon Sep 17 00:00:00 2001 From: Eltrac Date: Fri, 28 Nov 2025 23:13:23 +0800 Subject: feat(router, context)!: support query string also move path split logic to parser.go --- engine.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'engine.go') diff --git a/engine.go b/engine.go index e3c8ca8..f777e6d 100644 --- a/engine.go +++ b/engine.go @@ -33,7 +33,7 @@ func (api *Engine) DELETE(path string, h Handler) { // serve and start func (a *Engine) ServeHTTP(w http.ResponseWriter, req *http.Request) { - handler, params := a.router.Find(req.Method, req.URL.Path) + handler, params, query := a.router.Find(req.Method, req.URL.Path) if handler == nil { http.NotFound(w, req) return @@ -42,6 +42,7 @@ func (a *Engine) ServeHTTP(w http.ResponseWriter, req *http.Request) { W: w, R: req, Params: params, + Querys: query, }) } -- cgit v1.2.3