working commit

This commit is contained in:
2026-02-02 17:27:16 +02:00
parent 0dac88fde8
commit 41e1b253f7
6 changed files with 160 additions and 67 deletions
+6 -6
View File
@@ -7,11 +7,11 @@ import (
)
type Context struct {
Ctx context.Context
Request *http.Request
Writer http.ResponseWriter
PathMap map[string]string
StatusCode int
Ctx context.Context
Request *http.Request
Writer http.ResponseWriter
PathMap map[string]string
StatusCode int
}
func NewContext(writer http.ResponseWriter, request *http.Request) *Context {
@@ -30,7 +30,7 @@ func (rctx *Context) SetHeader(key, value string) {
}
func (rctx *Context) SetStatus(httpStatus int) {
rctx.StatusCode = httpStatus
rctx.StatusCode = httpStatus
rctx.Writer.WriteHeader(httpStatus)
}