summaryrefslogtreecommitdiff
path: root/context.go
diff options
context:
space:
mode:
authorEltrac <hi@guhub.cn>2025-11-27 11:31:35 +0800
committerEltrac <hi@guhub.cn>2025-11-27 11:31:35 +0800
commitbb58f6cd1d9cce5b12e2f9a30b1c9a6aaefdd54c (patch)
tree8a668165b0f0f57c4fc10a462cf22f2cdbdf5954 /context.go
parenta13c9a7abe43e9e3f21799e8be161422c7fad5a4 (diff)
refactor: move type definitions to types.go also, rename Api to Engine.
Diffstat (limited to 'context.go')
-rw-r--r--context.go8
1 files changed, 0 insertions, 8 deletions
diff --git a/context.go b/context.go
index 98f52c7..9b00f4c 100644
--- a/context.go
+++ b/context.go
@@ -6,12 +6,6 @@ import (
"strconv"
)
-type Context struct {
- W http.ResponseWriter
- R *http.Request
- Params map[string]string
-}
-
func (c *Context) Plain(code int, data string) {
c.W.Header().Set("Content-Type", "text/plain; charset=utf-8")
c.W.WriteHeader(code)
@@ -49,5 +43,3 @@ func (c *Context) Unauthorized(msg string) {
func (c *Context) InternalError(msg string) {
c.Error(http.StatusInternalServerError, msg)
}
-
-type Handler func(c *Context)