From 02514ec1f993095032751c01602f01415c248a0d Mon Sep 17 00:00:00 2001 From: nlwkobe30 Date: Thu, 5 Jan 2023 02:00:58 +0800 Subject: [PATCH] Revert "docs: update" This reverts commit 82716193b753dbcad6fee85973790727b7a31ae5. --- docs/doc.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/docs/doc.md b/docs/doc.md index 167725e2..7cebab56 100644 --- a/docs/doc.md +++ b/docs/doc.md @@ -2108,13 +2108,15 @@ func main() { router := gin.Default() router.GET("/cookie", func(c *gin.Context) { - cookie, err := c.Cookie("gin_cookie") - if err != nil { - cookie = "NotSet" - c.SetCookie("gin_cookie", "test", 3600, "/", "localhost", false, true) - } - fmt.Printf("Cookie value: %s \n", cookie) + cookie, err := c.Cookie("gin_cookie") + + if err != nil { + cookie = "NotSet" + c.SetCookie("gin_cookie", "test", 3600, "/", "localhost", false, true) + } + + fmt.Printf("Cookie value: %s \n", cookie) }) router.Run()