Files
athens/vendor/github.com/gobuffalo/buffalo/handler.go
Henry Jenkins d26b99d41c Upgrade Buffalo (#789)
* Upgrade buffalo

* Switch to go modules everywhere

* Fixes from buffalo fix

* Add missing modules from module list

* Update vendored modules in /vendor

* Stop using vendor directory for tests

* Check go.mod and go.sum files on verify

* Upgrade Buffalo from v0.13.0 to v0.13.1

* Fix test for new Buffalo

Allow for new Buffalo code

* Add test for endpoint with trailing slash
2018-10-23 16:49:32 -07:00

23 lines
623 B
Go

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, "http://github.com/gobuffalo/buffalo")
}
func (c Context) error {
return c.Error(422, errors.New("oops!!"))
}
*/
type Handler func(Context) error