diff options
| author | Eltrac <hi@guhub.cn> | 2025-12-03 15:46:30 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-12-03 15:46:30 +0800 |
| commit | 264ab718015da27d97a7f7ac4132b1e061f9d8d9 (patch) | |
| tree | 9653faea7dd4e742c2d65fb7f758f3ebf9239a67 /engine.go | |
| parent | a206d80e51372dffcb86b6fcd2be3c8e24517c5c (diff) | |
| parent | f2103d4182acde938572c16753f8752c1f811fbf (diff) | |
Merge pull request #1 from BigCoke233/fix-empty-params
refactor, fix: use vanilla `request.URL.Query()` instead of a custom parser
Diffstat (limited to 'engine.go')
| -rw-r--r-- | engine.go | 4 |
1 files changed, 2 insertions, 2 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, query := a.router.Find(req.Method, req.URL.Path) + handler, params := a.router.Find(req.Method, req.URL.Path) if handler == nil { http.NotFound(w, req) return @@ -42,7 +42,7 @@ func (a *Engine) ServeHTTP(w http.ResponseWriter, req *http.Request) { W: w, R: req, Params: params, - Querys: query, + Querys: req.URL.Query(), }) } |
