Router defines a Renderer interface for rendering a template.

func render(c *clevergo.Context) error {
    return c.Render(http.StatusOK, "index.tmpl", clevergo.Map{
        "message": "hello world",

Before starting, we need to register a renderer, supported template engines are listed below.

Please feel free to implement a renderer for other template engine, and then mention it here by creating a PR.


Jet Renderer is an adapter for Jet template engine.

router.Renderer = jetrenderer.New(jet.NewHTMLSet("./views"))
comments powered by Disqus