在echo框架中
func GetIndex(c echo.Context) error {
return c.Render(http.StatusOK, "index", echo.Map{"Title": index})
}
func main() {
e := echo.New()
e.Renderer = echoview.Default()
....
e.GET("/index", GetIndex)
e.Logger.Fatal(e.Start(":1323"))
}
我想要的是从另一个包含{{something}}的函数传递的字符串到
c.Render(http.StatusOK, "index", echo.Map{"Title": index, "Template": ??? })
示例:
{{define}}
This string is generate by another function {{.Title}}
{{end}}
有什么办法吗?