mirror of
https://github.com/gomods/athens
synced 2026-02-03 11:00:32 +00:00
* 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
23 lines
623 B
Go
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
|