Fix syntax highlighting err

This commit is contained in:
vCaesar
2017-05-20 18:00:35 +08:00
parent 19c6592848
commit c8b0a1f6d3

View File

@@ -59,11 +59,12 @@ Go uses the `SetCookie` function in the `net/http` package to set cookies:
}
```
Here is an example of setting a cookie:
```Go
expiration := time.Now().Add(365 * 24 * time.Hour)
cookie := http.Cookie{Name: "username", Value: "astaxie", Expires: expiration}
http.SetCookie(w, &cookie)
```  
```
## Fetch cookies in Go