Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
23 lines (19 sloc) 623 Bytes
package buffalo
// Handler is the basis for all of Buffalo. A Handler
// will be given a Context interface that represents the
// give request/response. It is the responsibility of the
// Handler to handle the request/response correctly. This
// could mean rendering a template, JSON, etc... or it could
// mean returning an error.
func (c Context) error {
return c.Render(200, render.String("Hello World!"))
func (c Context) error {
return c.Redirect(301, "")
func (c Context) error {
return c.Error(422, errors.New("oops!!"))
type Handler func(Context) error
You can’t perform that action at this time.