From e02174cb710e6d6abd642f03e64ce91bbac38130 Mon Sep 17 00:00:00 2001 From: lost+skunk Date: Sat, 13 Jul 2024 23:55:28 +0300 Subject: Исправление некоторых обосрамсов MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/router.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'app/router.go') diff --git a/app/router.go b/app/router.go index f3c59c5..0dd2f79 100644 --- a/app/router.go +++ b/app/router.go @@ -51,7 +51,6 @@ func Router() { } path := parsepath(r.URL.Path) - // структура с функциями var skunky skunkyart skunky.Writer = w @@ -77,7 +76,7 @@ func Router() { default: skunky.ReturnHTTPError(404) case "": - skunky.ExecuteTemplate("html/index.htm", &CFG.BasePath) + skunky.ExecuteTemplate("index.htm", &CFG.BasePath) case "post": skunky.Deviation(path[2], path[3]) case "search": @@ -98,10 +97,10 @@ func Router() { skunky.About() case "stylesheet": w.Header().Add("content-type", "text/css") - io.WriteString(w, Templates["css/skunky.css"]) + io.WriteString(w, Templates["skunky.css"]) } } http.HandleFunc("/", handle) - http.ListenAndServe(CFG.Listen, nil) + try_with_exitstatus(http.ListenAndServe(CFG.Listen, nil), 1) } -- cgit v1.2.3