Example #1
0
func root(c *fogo.Context) (int, interface{}) {
	output, outErr := c.RenderTemplate(nil, "example.tpl")
	if outErr != nil {
		return 500, outErr.Error()
	}
	return 200, output
}
Example #2
0
func showFlashes(c *fogo.Context) (int, interface{}) {
	out, outErr := c.RenderTemplate(nil, "flashes.tpl")
	if outErr != nil {
		return http.StatusBadRequest, outErr.Error()
	}
	return 200, out
}