Removed go-bindata-assetfs and replaced with statik

This commit is contained in:
Nicholas Thompson
2019-02-28 21:36:52 +02:00
committed by ncthompson
parent 790b05f90f
commit 206159cdea
13 changed files with 38 additions and 391 deletions

View File

@@ -16,12 +16,7 @@ func main() {
mk2 := NewMk2Mock()
gui := webgui.NewWebGui(mk2)
rootFs := http.FileServer(frontend.BinaryFileSystem("root"))
http.Handle("/", rootFs)
jsFs := http.FileServer(frontend.BinaryFileSystem("js"))
http.Handle("/js/", http.StripPrefix("/js", jsFs))
cssFs := http.FileServer(frontend.BinaryFileSystem("css"))
http.Handle("/css/", http.StripPrefix("/css", cssFs))
http.Handle("/", frontend.NewStatic())
http.Handle("/ws", http.HandlerFunc(gui.ServeHub))
http.Handle("/munin", http.HandlerFunc(gui.ServeMuninHTTP))

View File

@@ -83,13 +83,7 @@ func main() {
gui := webgui.NewWebGui(mk2)
rootFs := http.FileServer(frontend.BinaryFileSystem("root"))
http.Handle("/", rootFs)
jsFs := http.FileServer(frontend.BinaryFileSystem("js"))
http.Handle("/js/", http.StripPrefix("/js", jsFs))
cssFs := http.FileServer(frontend.BinaryFileSystem("css"))
http.Handle("/css/", http.StripPrefix("/css", cssFs))
http.Handle("/", frontend.NewStatic())
http.Handle("/ws", http.HandlerFunc(gui.ServeHub))
http.Handle("/munin", http.HandlerFunc(gui.ServeMuninHTTP))
http.Handle("/muninconfig", http.HandlerFunc(gui.ServeMuninConfigHTTP))