From 327d81eaf3561e7cb5505170ffae3929daf2b974 Mon Sep 17 00:00:00 2001 From: Lawxen Liu Date: Wed, 29 Mar 2023 18:26:16 +0800 Subject: [PATCH 1/3] Update cookie.md to add doc for deleting cookie --- content/en/docs/examples/cookie.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/content/en/docs/examples/cookie.md b/content/en/docs/examples/cookie.md index 231473ca5..6d47799b3 100644 --- a/content/en/docs/examples/cookie.md +++ b/content/en/docs/examples/cookie.md @@ -1,8 +1,10 @@ --- -title: "Set and get a cookie" +title: "Cookie" draft: false --- +Set and get cookie. + ```go import ( "fmt" @@ -29,3 +31,9 @@ func main() { router.Run() } ``` + +Delete cookie by set max age to -1. + +```go +c.SetCookie("gin_cookie", "test", -1, "/", "localhost", false, true) +``` From 0dda1a8d7fb2f7c5416cd284017467e05f022596 Mon Sep 17 00:00:00 2001 From: Lawxen Liu Date: Wed, 29 Mar 2023 18:37:55 +0800 Subject: [PATCH 2/3] Update zh-cn and zh-tw fow chang oof cookie.md --- content/zh-cn/docs/examples/cookie.md | 10 +++++++++- content/zh-tw/docs/examples/cookie.md | 10 +++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/content/zh-cn/docs/examples/cookie.md b/content/zh-cn/docs/examples/cookie.md index 0f7bb56ac..a778ae3d9 100644 --- a/content/zh-cn/docs/examples/cookie.md +++ b/content/zh-cn/docs/examples/cookie.md @@ -1,8 +1,10 @@ --- -title: "设置和获取 Cookie" +title: "Cookie" draft: false --- +设置和获取 Cookie + ```go import ( "fmt" @@ -29,3 +31,9 @@ func main() { router.Run() } ``` + +删除cookie: 通过设置max age的值为-1. + +```go +c.SetCookie("gin_cookie", "test", -1, "/", "localhost", false, true) +``` diff --git a/content/zh-tw/docs/examples/cookie.md b/content/zh-tw/docs/examples/cookie.md index 231473ca5..6d47799b3 100644 --- a/content/zh-tw/docs/examples/cookie.md +++ b/content/zh-tw/docs/examples/cookie.md @@ -1,8 +1,10 @@ --- -title: "Set and get a cookie" +title: "Cookie" draft: false --- +Set and get cookie. + ```go import ( "fmt" @@ -29,3 +31,9 @@ func main() { router.Run() } ``` + +Delete cookie by set max age to -1. + +```go +c.SetCookie("gin_cookie", "test", -1, "/", "localhost", false, true) +``` From 902b4bc221052f1a25b008178bf1a234bba8e577 Mon Sep 17 00:00:00 2001 From: Lawxen Liu Date: Thu, 30 Mar 2023 19:39:27 +0800 Subject: [PATCH 3/3] update other language for the doc change of cookie --- content/es/docs/examples/cookie.md | 10 +++++++++- content/fa/docs/examples/cookie.md | 10 +++++++++- content/ja/docs/examples/cookie.md | 10 +++++++++- content/ko-kr/docs/examples/cookie.md | 10 +++++++++- content/pt/docs/examples/cookie.md | 10 +++++++++- content/tr/docs/examples/cookie.md | 10 +++++++++- 6 files changed, 54 insertions(+), 6 deletions(-) diff --git a/content/es/docs/examples/cookie.md b/content/es/docs/examples/cookie.md index 9c1f1fa2b..bf15986ac 100644 --- a/content/es/docs/examples/cookie.md +++ b/content/es/docs/examples/cookie.md @@ -1,8 +1,10 @@ --- -title: "Crear y obtener una cookie" +title: "Cookie" draft: false --- +Crear y obtener una cookie + ```go import ( "fmt" @@ -29,3 +31,9 @@ func main() { router.Run() } ``` + +Delete cookie by set max age to -1. + +```go +c.SetCookie("gin_cookie", "test", -1, "/", "localhost", false, true) +``` diff --git a/content/fa/docs/examples/cookie.md b/content/fa/docs/examples/cookie.md index 231473ca5..6d47799b3 100644 --- a/content/fa/docs/examples/cookie.md +++ b/content/fa/docs/examples/cookie.md @@ -1,8 +1,10 @@ --- -title: "Set and get a cookie" +title: "Cookie" draft: false --- +Set and get cookie. + ```go import ( "fmt" @@ -29,3 +31,9 @@ func main() { router.Run() } ``` + +Delete cookie by set max age to -1. + +```go +c.SetCookie("gin_cookie", "test", -1, "/", "localhost", false, true) +``` diff --git a/content/ja/docs/examples/cookie.md b/content/ja/docs/examples/cookie.md index fcbc27f0f..2d743101f 100644 --- a/content/ja/docs/examples/cookie.md +++ b/content/ja/docs/examples/cookie.md @@ -1,8 +1,10 @@ --- -title: "cookieの設定と取得" +title: "Cookie" draft: false --- +cookieの設定と取得 + ```go import ( "fmt" @@ -29,3 +31,9 @@ func main() { router.Run() } ``` + +Delete cookie by set max age to -1. + +```go +c.SetCookie("gin_cookie", "test", -1, "/", "localhost", false, true) +``` diff --git a/content/ko-kr/docs/examples/cookie.md b/content/ko-kr/docs/examples/cookie.md index b2baf5db8..417b24974 100644 --- a/content/ko-kr/docs/examples/cookie.md +++ b/content/ko-kr/docs/examples/cookie.md @@ -1,8 +1,10 @@ --- -title: "쿠키의 설정 및 가져오기" +title: "Cookie" draft: false --- +쿠키의 설정 및 가져오기 + ```go import ( "fmt" @@ -29,3 +31,9 @@ func main() { router.Run() } ``` + +Delete cookie by set max age to -1. + +```go +c.SetCookie("gin_cookie", "test", -1, "/", "localhost", false, true) +``` diff --git a/content/pt/docs/examples/cookie.md b/content/pt/docs/examples/cookie.md index 231473ca5..6d47799b3 100644 --- a/content/pt/docs/examples/cookie.md +++ b/content/pt/docs/examples/cookie.md @@ -1,8 +1,10 @@ --- -title: "Set and get a cookie" +title: "Cookie" draft: false --- +Set and get cookie. + ```go import ( "fmt" @@ -29,3 +31,9 @@ func main() { router.Run() } ``` + +Delete cookie by set max age to -1. + +```go +c.SetCookie("gin_cookie", "test", -1, "/", "localhost", false, true) +``` diff --git a/content/tr/docs/examples/cookie.md b/content/tr/docs/examples/cookie.md index 231473ca5..6d47799b3 100644 --- a/content/tr/docs/examples/cookie.md +++ b/content/tr/docs/examples/cookie.md @@ -1,8 +1,10 @@ --- -title: "Set and get a cookie" +title: "Cookie" draft: false --- +Set and get cookie. + ```go import ( "fmt" @@ -29,3 +31,9 @@ func main() { router.Run() } ``` + +Delete cookie by set max age to -1. + +```go +c.SetCookie("gin_cookie", "test", -1, "/", "localhost", false, true) +```