Pagination Logic for your template
{{define "pagination"}}
<div>
<a href="?page=1">First</a>
<a href="?page={{.Prev}}">Prev</a>
{{range .Pages 2 2}}
{{if eq . 0}}
<a class="disabled">...</a>
{{else if eq $.Page .}}
<a class="active">{{.}}</a>
{{else}}
<a href="?page={{.}}">{{.}}</a>
{{end}}
{{end}}
<a href="?page={{.Next}}">Next</a>
<a href="?page={{.MaxPage}}">Last</a>
</div>
{{end}}