Removed SetStatus
This commit is contained in:
parent
63ee1655fe
commit
37d174eec3
@ -18,7 +18,6 @@ type Context interface {
|
||||
Reader(io.Reader) error
|
||||
Request() Request
|
||||
Response() Response
|
||||
SetStatus(status int)
|
||||
String(string) error
|
||||
}
|
||||
|
||||
@ -59,7 +58,7 @@ func (ctx *context) Error(status int, messages ...any) error {
|
||||
}
|
||||
}
|
||||
|
||||
ctx.SetStatus(status)
|
||||
ctx.response.WriteHeader(status)
|
||||
return errors.Join(combined...)
|
||||
}
|
||||
|
||||
@ -90,11 +89,6 @@ func (ctx *context) Response() Response {
|
||||
return &ctx.response
|
||||
}
|
||||
|
||||
// SetStatus writes the header with the given HTTP status code.
|
||||
func (ctx *context) SetStatus(status int) {
|
||||
ctx.response.WriteHeader(status)
|
||||
}
|
||||
|
||||
// String responds with the given string.
|
||||
func (ctx *context) String(body string) error {
|
||||
slice := unsafe.Slice(unsafe.StringData(body), len(body))
|
||||
|
Loading…
Reference in New Issue
Block a user