diff --git a/errors.go b/errors.go index 8759156..55a814c 100644 --- a/errors.go +++ b/errors.go @@ -6,11 +6,11 @@ import ( ) type errorData struct { - Title string + Title string Message string } -func serve404(w http.ResponseWriter, r *http.Request) { +func serve404(w http.ResponseWriter, r *http.Request) { render(w, templateError, &errorData{ Title: "404 Not Found", Message: fmt.Sprintf("`%s` was not found", r.RequestURI), diff --git a/templateAssets.go b/templateAssets.go index 7e49172..e4ad929 100644 --- a/templateAssets.go +++ b/templateAssets.go @@ -18,6 +18,9 @@ var assetFiles map[string]string func initTemplateAssets() error { err := os.RemoveAll(compiledAssetsFolder) + if err != nil { + return err + } err = os.MkdirAll(compiledAssetsFolder, 0755) if err != nil { return err