From 051e9100ac85526d329dc049c2891d61921c6d20 Mon Sep 17 00:00:00 2001 From: Needrima Date: Sun, 7 May 2023 00:22:25 +0100 Subject: [PATCH] changed the method 'Header(key, value string)' on 'type Context' to 'SetHeader(key, value string)' for more clarity and to match the method 'GetHeader(key string)string' --- context.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/context.go b/context.go index 5716318e..a244c212 100644 --- a/context.go +++ b/context.go @@ -858,7 +858,7 @@ func (c *Context) Status(code int) { // Header is an intelligent shortcut for c.Writer.Header().Set(key, value). // It writes a header in the response. // If value == "", this method removes the header `c.Writer.Header().Del(key)` -func (c *Context) Header(key, value string) { +func (c *Context) SetHeader(key, value string) { if value == "" { c.Writer.Header().Del(key) return