From: Sebastian Harl Date: Wed, 26 Nov 2014 21:03:31 +0000 (+0100) Subject: Use the 'page' type in the error handler as well. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=0a0d73db3469bce788b4307966a46622748b5cae;p=sysdb%2Fwebui.git Use the 'page' type in the error handler as well. --- diff --git a/server/error.go b/server/error.go index 2afa44a..270225a 100644 --- a/server/error.go +++ b/server/error.go @@ -30,7 +30,6 @@ package server import ( "bytes" "fmt" - "html/template" "io" "log" "net/http" @@ -51,11 +50,7 @@ func (s *Server) internal(w http.ResponseWriter, err error) { func (s *Server) err(w http.ResponseWriter, status int, err error) { log.Printf("%s: %v", http.StatusText(status), err) - page := struct { - Title string - Query string - Content template.HTML - }{ + page := page{ Title: "SysDB - Error", Content: "
" + html(err.Error()) + "
", }