Refactor template loading around the handler

This commit is contained in:
Las Zenow 2017-06-06 14:18:47 +00:00
parent d40dc21627
commit 5517da6a69
9 changed files with 40 additions and 42 deletions

View file

@ -54,7 +54,7 @@ func searchHandler(h handler) {
data.Prev = "/search/?q=" + req + "&p=" + strconv.Itoa(page-1) + "&num=" + strconv.Itoa(items_page)
}
h.template.load(h, "search", data)
h.load("search", data)
}
func itemsPage(r *http.Request) int {