mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-16 13:22:09 +08:00
docs: update
This commit is contained in:
parent
a14466232b
commit
82716193b7
@ -2108,9 +2108,7 @@ func main() {
|
|||||||
router := gin.Default()
|
router := gin.Default()
|
||||||
|
|
||||||
router.GET("/cookie", func(c *gin.Context) {
|
router.GET("/cookie", func(c *gin.Context) {
|
||||||
|
|
||||||
cookie, err := c.Cookie("gin_cookie")
|
cookie, err := c.Cookie("gin_cookie")
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
cookie = "NotSet"
|
cookie = "NotSet"
|
||||||
c.SetCookie("gin_cookie", "test", 3600, "/", "localhost", false, true)
|
c.SetCookie("gin_cookie", "test", 3600, "/", "localhost", false, true)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user