MCPcopy
hub / github.com/benbjohnson/wtf / SetFlash

Function SetFlash

http/http.go:68–75  ·  view source on GitHub ↗

SetFlash sets the flash cookie for the next request to read.

(w http.ResponseWriter, s string)

Source from the content-addressed store, hash-verified

66
67// SetFlash sets the flash cookie for the next request to read.
68func 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.
78func Error(w http.ResponseWriter, r *http.Request, err error) {

Callers 7

handleDialCreateMethod · 0.85
handleDialUpdateMethod · 0.85
handleDialDeleteMethod · 0.85
loadFlashFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected