summaryrefslogtreecommitdiff
path: root/context.go
diff options
context:
space:
mode:
authorEltrac <hi@guhub.cn>2025-12-03 14:47:01 +0800
committerEltrac <hi@guhub.cn>2025-12-03 14:47:01 +0800
commitc1f6161d4360578cba00f2a6933b7cf9247622a3 (patch)
treeb907b66e0beb5da85f3f8b83cb871ef40188bd5d /context.go
parent8871615c98bce3c2c3aa871ce4e80126558cb91b (diff)
style: run gofmt and remove pointless comments
Diffstat (limited to 'context.go')
-rw-r--r--context.go22
1 files changed, 11 insertions, 11 deletions
diff --git a/context.go b/context.go
index e0de660..6241179 100644
--- a/context.go
+++ b/context.go
@@ -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)
}