Add page footer with request time display
This commit is contained in:
@@ -23,6 +23,7 @@ type searchPageData struct {
|
||||
EditMode bool
|
||||
Query string
|
||||
Results []searchResult
|
||||
RenderMS int64
|
||||
}
|
||||
|
||||
// handleSearch walks the wiki root and renders a search results page for the
|
||||
@@ -43,6 +44,7 @@ func (h *handler) handleSearch(w http.ResponseWriter, r *http.Request) {
|
||||
Results: results,
|
||||
}
|
||||
w.Header().Set("Content-Type", "text/html; charset=utf-8")
|
||||
data.RenderMS = elapsedMS(r)
|
||||
if err := searchTmpl.ExecuteTemplate(w, "layout", data); err != nil {
|
||||
log.Printf("search template error: %v", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user