summaryrefslogtreecommitdiff
path: root/context.go
diff options
context:
space:
mode:
authorEltrac <hi@guhub.cn>2025-11-27 10:36:15 +0800
committerEltrac <hi@guhub.cn>2025-11-27 10:36:15 +0800
commita52afde13b4e483e5dd96c7d1a3ace81ce400103 (patch)
treef4914a5e788417cddf9ee039ce1a205141c1f7f8 /context.go
parenta555355d69a4fe9cd01d8bea86ce5b057cd1cd66 (diff)
feat: get router working properly and implement basic methods
Diffstat (limited to 'context.go')
-rw-r--r--context.go10
1 files changed, 1 insertions, 9 deletions
diff --git a/context.go b/context.go
index fbb6a1e..628cb4f 100644
--- a/context.go
+++ b/context.go
@@ -6,16 +6,8 @@ import (
type Context struct {
W http.ResponseWriter
- R http.Request
+ R *http.Request
Params map[string]string
}
type Handler func(c *Context)
-
-func (h Handler) ServeHTTP(w http.ResponseWriter, r http.Request) {
- h(&Context{
- W: w,
- R: r,
- Params: make(map[string]string),
- })
-}