diff options
| author | Eltrac <hi@guhub.cn> | 2025-12-03 14:47:01 +0800 |
|---|---|---|
| committer | Eltrac <hi@guhub.cn> | 2025-12-03 14:47:01 +0800 |
| commit | c1f6161d4360578cba00f2a6933b7cf9247622a3 (patch) | |
| tree | b907b66e0beb5da85f3f8b83cb871ef40188bd5d /context.go | |
| parent | 8871615c98bce3c2c3aa871ce4e80126558cb91b (diff) | |
style: run gofmt and remove pointless comments
Diffstat (limited to 'context.go')
| -rw-r--r-- | context.go | 22 |
1 files changed, 11 insertions, 11 deletions
@@ -44,9 +44,9 @@ func (c *Context) XML(code int, data string) { // error, message, status func (c *Context) Error(code int, msg string) { c.JSON(code, map[string]string{ - "error": http.StatusText(code), + "error": http.StatusText(code), "message": msg, - "status": strconv.Itoa(code), + "status": strconv.Itoa(code), }) } @@ -101,13 +101,13 @@ func (c *Context) SetCompleteCookie(cookie *http.Cookie) { func (c *Context) SetCookie(name string, value string) { cookie := http.Cookie{ - Name: name, - Value: value, - Path: "/", - MaxAge: 3600, - HttpOnly: true, - Secure: true, - SameSite: http.SameSiteLaxMode, - } - c.SetCompleteCookie(&cookie) + Name: name, + Value: value, + Path: "/", + MaxAge: 3600, + HttpOnly: true, + Secure: true, + SameSite: http.SameSiteLaxMode, + } + c.SetCompleteCookie(&cookie) } |
