mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 05:40:54 +00:00
move to context
This commit is contained in:
parent
2513bcf584
commit
11b4bf8aaa
@ -1,11 +1,9 @@
|
|||||||
package httpResponse
|
package context
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
beecontext "github.com/astaxie/beego/context"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@ -24,6 +22,6 @@ func (s StatusCode) Error() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Render sets the http status code
|
// Render sets the http status code
|
||||||
func (s StatusCode) Render(ctx *beecontext.Context) {
|
func (s StatusCode) Render(ctx *Context) {
|
||||||
ctx.Output.SetStatus(int(s))
|
ctx.Output.SetStatus(int(s))
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user