This commit is contained in:
Jan-Lukas Else 2020-09-21 16:12:17 +02:00
parent 2a9502defb
commit 856f0a307c
2 changed files with 5 additions and 2 deletions

View File

@ -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),

View File

@ -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