From 3390697686bf312547c811e1f7b0a945fcd100b9 Mon Sep 17 00:00:00 2001 From: akuma06 Date: Sun, 7 May 2017 00:26:02 +0200 Subject: [PATCH 1/2] Fixed typo --- router/router.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/router/router.go b/router/router.go index ec37579a..f2b14ba8 100644 --- a/router/router.go +++ b/router/router.go @@ -11,12 +11,12 @@ var Router *mux.Router func init() { Router = mux.NewRouter() - cssHandler := http.FileServer(http.Dir("./static/css/")) - jsHandler := http.FileServer(http.Dir("./static/js/")) - imgHandler := http.FileServer(http.Dir("./static/img/")) - http.Handle("/css/", http.StripPrefix("/static/css/", cssHandler)) - http.Handle("/js/", http.StripPrefix("/static/js/", jsHandler)) - http.Handle("/img/", http.StripPrefix("/static/img/", imgHandler)) + cssHandler := http.FileServer(http.Dir("./public/css/")) + jsHandler := http.FileServer(http.Dir("./public/js/")) + imgHandler := http.FileServer(http.Dir("./public/img/")) + http.Handle("/css/", http.StripPrefix("/public/css/", cssHandler)) + http.Handle("/js/", http.StripPrefix("/public/js/", jsHandler)) + http.Handle("/img/", http.StripPrefix("/public/img/", imgHandler)) // Routes, Router.HandleFunc("/", HomeHandler).Name("home") From f7cfa7d7fa030630b86d6d0792dbd44d4e10f801 Mon Sep 17 00:00:00 2001 From: akuma06 Date: Sun, 7 May 2017 00:27:26 +0200 Subject: [PATCH 2/2] Fixed Typo --- router/router.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/router/router.go b/router/router.go index f2b14ba8..b184ac25 100644 --- a/router/router.go +++ b/router/router.go @@ -14,9 +14,9 @@ func init() { cssHandler := http.FileServer(http.Dir("./public/css/")) jsHandler := http.FileServer(http.Dir("./public/js/")) imgHandler := http.FileServer(http.Dir("./public/img/")) - http.Handle("/css/", http.StripPrefix("/public/css/", cssHandler)) - http.Handle("/js/", http.StripPrefix("/public/js/", jsHandler)) - http.Handle("/img/", http.StripPrefix("/public/img/", imgHandler)) + http.Handle("/css/", http.StripPrefix("/css/", cssHandler)) + http.Handle("/js/", http.StripPrefix("/js/", jsHandler)) + http.Handle("/img/", http.StripPrefix("/img/", imgHandler)) // Routes, Router.HandleFunc("/", HomeHandler).Name("home")