Component returns a new Handler which can be registered as a main handler for a route. It's a shortcut handler that renders the given component as HTML through Context.RenderComponent.
(component context.Component)
| 295 | // Component returns a new Handler which can be registered as a main handler for a route. |
| 296 | // It's a shortcut handler that renders the given component as HTML through Context.RenderComponent. |
| 297 | func Component(component context.Component) Handler { |
| 298 | return func(ctx Context) { |
| 299 | ctx.RenderComponent(component) |
| 300 | } |
| 301 | } |
| 302 | |
| 303 | // PrefixDir returns a new FileSystem that opens files |
| 304 | // by adding the given "prefix" to the directory tree of "fs". |
nothing calls this directly
no test coverage detected
searching dependent graphs…