Skip to content

Commit

Permalink
Revert "docs: update"
Browse files Browse the repository at this point in the history
This reverts commit 8271619.
  • Loading branch information
apriil15 committed Jan 4, 2023
1 parent 8271619 commit 02514ec
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions docs/doc.md
Expand Up @@ -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()
Expand Down

0 comments on commit 02514ec

Please sign in to comment.