diff options
| author | Eltrac <hi@guhub.cn> | 2025-11-28 23:13:23 +0800 |
|---|---|---|
| committer | Eltrac <hi@guhub.cn> | 2025-11-28 23:13:23 +0800 |
| commit | 3f53ba50f2e562b5a2bc97442266b5e7acd585eb (patch) | |
| tree | ab29b0db71bb1661af0502b3b3442fb0f84a0590 /engine.go | |
| parent | accb1bae86a3547f16dcc448f92ec73a493dfd85 (diff) | |
feat(router, context)!: support query string also move path split logic to
parser.go
Diffstat (limited to 'engine.go')
| -rw-r--r-- | engine.go | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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, }) } |
