+8
appview/pages/pages.go
+8
appview/pages/pages.go
···
248
}
249
return http.StripPrefix("/static/", http.FileServer(http.FS(sub)))
250
}
251
+
252
+
func (p *Pages) Error500(w io.Writer) error {
253
+
return p.execute("errors/500", w, nil)
254
+
}
255
+
256
+
func (p *Pages) Error404(w io.Writer) error {
257
+
return p.execute("errors/404", w, nil)
258
+
}
+5
-10
appview/pages/templates/errors/404.html
+5
-10
appview/pages/templates/errors/404.html
+5
-10
appview/pages/templates/errors/500.html
+5
-10
appview/pages/templates/errors/500.html
+7
appview/state/state.go
+7
appview/state/state.go
···
612
})
613
})
614
615
+
r.NotFound(func(w http.ResponseWriter, r *http.Request) {
616
+
s.pages.Error404(w)
617
+
})
618
+
619
return r
620
}
621
···
664
665
r.Get("/keys/{user}", s.Keys)
666
667
+
r.NotFound(func(w http.ResponseWriter, r *http.Request) {
668
+
s.pages.Error404(w)
669
+
})
670
return r
671
}