func PutCook(w http.ResponseWriter, r *http.Request) { count++ key := fmt.Sprintf("KEY %d", count) val := fmt.Sprintf("VALUE %d", count) cook.Put(w, key, val) fmt.Fprintf(w, "Set Cookie: %s, %s", key, val) return }
func SetFlash(w http.ResponseWriter, kind, msg string) { cook.Put(w, "flash", kind+":"+msg) }
func SetCSRF(w http.ResponseWriter) string { csrf := Random(32) cook.Put(w, "C", csrf) return csrf }