SetFlash sets the flash cookie for the next request to read.
(w http.ResponseWriter, s string)
| 66 | |
| 67 | // SetFlash sets the flash cookie for the next request to read. |
| 68 | func SetFlash(w http.ResponseWriter, s string) { |
| 69 | http.SetCookie(w, &http.Cookie{ |
| 70 | Name: "flash", |
| 71 | Value: s, |
| 72 | Path: "/", |
| 73 | HttpOnly: true, |
| 74 | }) |
| 75 | } |
| 76 | |
| 77 | // Error prints & optionally logs an error message. |
| 78 | func Error(w http.ResponseWriter, r *http.Request, err error) { |
no outgoing calls
no test coverage detected