all repos — homestead @ 802d74fc1d38b7ee64f63c2f10810b20305c828a

Code for my website

make HTTP error an interface

Alan Pearce
commit

802d74fc1d38b7ee64f63c2f10810b20305c828a

parent

c0f110119e434f188f5959c48570df12121cc663

1 file changed, 3 insertions(+), 3 deletions(-)

changed files
M domain/web/templates/error.godomain/web/templates/error.go
@@ -5,14 +5,14 @@ "strconv"
g "alin.ovh/gomponents" . "alin.ovh/gomponents/html" - http "alin.ovh/homestead/shared/http" + "alin.ovh/homestead/shared/http" ) -func Error(site SiteSettings, err *http.Error) g.Node { +func Error(site SiteSettings, err http.Error) g.Node { return Layout(site, PageSettings{ Title: "Error", }, Div( - H1(g.Text(strconv.Itoa(err.Code)+" "+err.Message)), + H1(g.Text(strconv.Itoa(err.StatusCode())+" "+err.Message())), H2(g.Text("ʕノ•ᴥ•ʔノ ︵ ┻━┻")), )) }