{{template "base" .}}
{{define "main"}}
{{range .FlashMessages}}
<div class="alert alert-danger">{{.}}</div>
{{end}}
{{end}}
However, this code gives me “not found 404” in the html template, my guessing is that the {{end}} statement for the for/loop ended the {{define “main”}} instead of ending the for loop. If I’m correct then is there a fix for that?
in Django I can directly specifiy what this {{end}} refers to ({% endblock main %} {% endif %} {% endfor %} etc…)
And if this wasn’t the error, Then what?! I’m using Gorilla/sessions and note that when i write {{.}} alone it gives me the flash message i wanted