mirror of https://github.com/jlelse/GoBlog
Fixes
This commit is contained in:
parent
2a9502defb
commit
856f0a307c
|
@ -6,11 +6,11 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
type errorData struct {
|
type errorData struct {
|
||||||
Title string
|
Title string
|
||||||
Message string
|
Message string
|
||||||
}
|
}
|
||||||
|
|
||||||
func serve404(w http.ResponseWriter, r *http.Request) {
|
func serve404(w http.ResponseWriter, r *http.Request) {
|
||||||
render(w, templateError, &errorData{
|
render(w, templateError, &errorData{
|
||||||
Title: "404 Not Found",
|
Title: "404 Not Found",
|
||||||
Message: fmt.Sprintf("`%s` was not found", r.RequestURI),
|
Message: fmt.Sprintf("`%s` was not found", r.RequestURI),
|
||||||
|
|
|
@ -18,6 +18,9 @@ var assetFiles map[string]string
|
||||||
|
|
||||||
func initTemplateAssets() error {
|
func initTemplateAssets() error {
|
||||||
err := os.RemoveAll(compiledAssetsFolder)
|
err := os.RemoveAll(compiledAssetsFolder)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
err = os.MkdirAll(compiledAssetsFolder, 0755)
|
err = os.MkdirAll(compiledAssetsFolder, 0755)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
Loading…
Reference in New Issue