-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhttphandlersprod.go
More file actions
66 lines (53 loc) · 1.66 KB
/
httphandlersprod.go
File metadata and controls
66 lines (53 loc) · 1.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
// +build !debug
package main
import (
"net/http"
)
func handlerMainJsBundle(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "text/javascript")
w.Write(FileMainBundleMinJS)
}
func handlerVendorsJsBundle(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "text/javascript")
w.Write(FileVendorsBundleMinJS)
}
func handlerEditorWorkerJS(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "text/javascript")
w.Write(FileEditorWorkerJS)
}
func handlerMonacoFontTTF(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "font/ttf")
w.Write(FileMonacoFontTTF)
}
func handlerThingsdbGIF(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "image/gif")
w.Write(FileThingsdbGIF)
}
func handlerThingsguiLogo(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "image/png")
w.Write(FileThingsguiLogo)
}
func handlerThingsdbLogo(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "image/png")
w.Write(FileThingsdbLogo)
}
func handlerCesbitLogo(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "image/png")
w.Write(FileCesbitLogo)
}
func handlerViewEditLogo(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "image/png")
w.Write(FileViewEditLogo)
}
func handlerFaviconIco(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "image/x-icon")
w.Write(FileFaviconICO)
}
func handlerMain(w http.ResponseWriter, r *http.Request) {
if r.URL.Path != "/" {
handlerNotFound(w, r)
} else {
w.Header().Set("Content-Type", "text/html")
w.Write(FileAppHTML)
}
}