RedirectAlert redirects to a URL after persisting the provided alert data into a cookie so that it can be displayed when the page is rendered.
(w http.ResponseWriter, r *http.Request, urlStr string, code int, alert Alert)
| 155 | // RedirectAlert redirects to a URL after persisting the provided alert data |
| 156 | // into a cookie so that it can be displayed when the page is rendered. |
| 157 | func RedirectAlert(w http.ResponseWriter, r *http.Request, urlStr string, code int, alert Alert) { |
| 158 | persistAlert(w, alert) |
| 159 | http.Redirect(w, r, urlStr, code) |
| 160 | } |
| 161 | |
| 162 | // PublicError is an error meant to be displayed to the public |
| 163 | type PublicError interface { |
no test coverage detected