summaryrefslogtreecommitdiff
path: root/engine.go
diff options
context:
space:
mode:
authorEltrac <hi@guhub.cn>2025-12-03 15:46:30 +0800
committerGitHub <noreply@github.com>2025-12-03 15:46:30 +0800
commit264ab718015da27d97a7f7ac4132b1e061f9d8d9 (patch)
tree9653faea7dd4e742c2d65fb7f758f3ebf9239a67 /engine.go
parenta206d80e51372dffcb86b6fcd2be3c8e24517c5c (diff)
parentf2103d4182acde938572c16753f8752c1f811fbf (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.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/engine.go b/engine.go
index 4c19fb2..6fc1060 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, 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(),
})
}