From 04c41b6f74b4762555a56b056db4ab5e123a609a Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Sat, 24 Feb 2024 14:17:33 +0100 Subject: html/template --- handler.go | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'handler.go') diff --git a/handler.go b/handler.go index 369da40..8894b62 100644 --- a/handler.go +++ b/handler.go @@ -1,22 +1,11 @@ package main import ( + "html/template" "io/ioutil" "net/http" - "text/template" ) -func init() { - http.Handle("/css/", http.FileServer(http.Dir("assets"))) - http.Handle("/fonts/", http.FileServer(http.Dir("assets"))) - http.HandleFunc("/index", indexHandler) - http.HandleFunc("/view/", viewHandler) - http.HandleFunc("/edit/", editHandler) - http.HandleFunc("/del/", delHandler) - http.HandleFunc("/save/", saveHandler) - http.HandleFunc("/", homeHandler) -} - var ( indextmpl = template.Must(template.ParseFiles("tmpl/root", "tmpl/index")) viewtmpl = template.Must(template.ParseFiles("tmpl/root", "tmpl/view")) -- cgit v1.2.3