Skip to content

Instantly share code, notes, and snippets.

View gist:34e2c489a6d6f62b655b
type MartiniPongo2 struct {
http.ResponseWriter
Context map[string]interface{}
}
func (m *MartiniPongo2) Html(fileName string, context map[string]interface{}) {
for k, v := range context {
m.Context[k] = v
}
var tpl = pongo2.Must(pongo2.FromFile("templates/" + fileName))