2020-07-22 14:50:08 +00:00
|
|
|
package context
|
|
|
|
|
2020-12-12 13:28:58 +00:00
|
|
|
// Renderer defines a http response renderer
|
2020-07-22 14:50:08 +00:00
|
|
|
type Renderer interface {
|
|
|
|
Render(ctx *Context)
|
|
|
|
}
|
|
|
|
|
|
|
|
type rendererFunc func(ctx *Context)
|
|
|
|
|
|
|
|
func (f rendererFunc) Render(ctx *Context) {
|
|
|
|
f(ctx)
|
|
|
|
}
|