From 4f48e16989fc601a9695fca9c8c5a65999be79c5 Mon Sep 17 00:00:00 2001 From: Eliot Whalan Date: Thu, 23 Jun 2016 11:46:50 +1000 Subject: [PATCH] Add missing slashes and tidy stuff up --- {static => assets}/index.html | 10 +++++----- main.go | 3 +-- 2 files changed, 6 insertions(+), 7 deletions(-) rename {static => assets}/index.html (84%) diff --git a/static/index.html b/assets/index.html similarity index 84% rename from static/index.html rename to assets/index.html index 760468b..b1ef521 100644 --- a/static/index.html +++ b/assets/index.html @@ -11,10 +11,10 @@ - + - - + + @@ -41,8 +41,8 @@ - - + + diff --git a/main.go b/main.go index ad2af2e..1fe3c1c 100644 --- a/main.go +++ b/main.go @@ -219,8 +219,7 @@ func main() { router.HandleFunc("/save", saveHandler) router.HandleFunc("/save/{output}", saveHandler) router.HandleFunc("/del/{pasteId}/{delKey}", delHandler) - router.PathPrefix("/").Handler(http.StripPrefix("/", http.FileServer(http.Dir("static/")))) - router.PathPrefix("/assets").Handler(http.StripPrefix("/assets", http.FileServer(http.Dir("assets/")))) + router.PathPrefix("/").Handler(http.StripPrefix("/", http.FileServer(http.Dir("assets/")))) err := http.ListenAndServe(PORT, router) if err != nil { log.Fatal(err)