From fcd66111aa6548ea47c010872a7cfdf27d4b2720 Mon Sep 17 00:00:00 2001 From: gabrielluizsf <93672097+gabrielluizsf@users.noreply.github.com> Date: Tue, 28 Jan 2025 11:50:39 -0300 Subject: [PATCH] feat: add Status method to Context for setting response status --- context.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/context.go b/context.go index 0de87a6..737c269 100644 --- a/context.go +++ b/context.go @@ -122,6 +122,11 @@ func (c *Context) SendStatus(status int) error { return c.Response.SendStatus(status) } +func (c *Context) Status(statusCode int) *Context { + c.Response = c.Response.Status(statusCode) + return c +} + func (c *Context) Send(data []byte) error { return c.Response.Send(data) }