Renderer provides a wrapper for unrolled/render's Render
instance that implements the labstack/echo Renderer
interface
for template rendering.
With a properly configured Go toolchain:
go get -u github.com/syntaqx/renderer
The minimum amount needed to set render as your apps template renderer is the following:
package main
import (
"github.com/labstack/echo"
"github.com/syntaqx/renderer"
"github.com/unrolled/render"
)
func main() {
e := echo.New()
r := render.New()
e.Renderer = renderer.Wrap(r)
// ... the rest of your application
e.Logger.Fatal(e.Start(":8080"))
}
However, that's not a particularly useful example, given there's no routes or templates to reference. For a bit more elaborate example, check out our example.
Please feel free to submit issues and send pull requests!
Renderer is licensed under the MIT license. See LICENSE file for details.