diff --git a/Context.go b/Context.go index b2715e0..29d151f 100644 --- a/Context.go +++ b/Context.go @@ -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))