func root(ctx *web.Context) string { msg := form if said, ok := ctx.GetSecureCookie("said"); ok { msg = "You said " + said + "<p>" + msg } return msg }
func process(ctx *web.Context) string { ctx.ContentType("txt") return fmt.Sprintf("%#v", ctx.Params) }
// This function will be called prior to each web request func AuthHandler(ctx *web.Context) error { ctx.User = "******" fmt.Println(ctx.Request.Header) return nil }
func i(ctx *web.Context) { ctx.Write([]byte("<a href=j>non-nil error")) }
func say(ctx *web.Context) { ctx.SetSecureCookie("said", ctx.Params["said"], 3600) ctx.Redirect(303, "/") return }