Refactor template loading around the handler
This commit is contained in:
parent
d40dc21627
commit
5517da6a69
9 changed files with 40 additions and 42 deletions
|
@ -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 {
|
||||
|
|
Reference in a new issue