Browse Source

En cours de développement

master
losyme 7 months ago
parent
commit
ed5211ad5a
  1. 4
      context/context.go
  2. 4
      context/render.go

4
context/context.go

@ -25,10 +25,6 @@ func (kv keysValues) get(key string) (interface{}, bool) {
return nil, false
}
type RendererType string
const RendererTypeJSON RendererType = "JSON"
type Context struct {
Request *http.Request
Response http.ResponseWriter

4
context/render.go

@ -15,6 +15,10 @@ const _jsonContentType = "application/json; charset=utf-8"
type MSI map[string]interface{}
type RendererType string
const RendererTypeJSON RendererType = "JSON"
func (c *Context) RenderStatus(status int) {
c.Status = status
c.Response.WriteHeader(status)

Loading…
Cancel
Save