Skip to content
Snippets Groups Projects
Commit 19dcda6f authored by bingyanglin's avatar bingyanglin
Browse files

update_error_check

parent 27eab545
No related branches found
No related tags found
No related merge requests found
......@@ -11,11 +11,11 @@ import (
)
var (
_, filename, _, _ = runtime.Caller(0)
Clients = make(map[*websocket.Conn]bool)
templPath = filepath.Join(filepath.Dir(filename), "./dashboard.html")
homeTempl, _ = template.ParseFiles(templPath)
upgrader = websocket.Upgrader{
_, filename, _, runtime_ok = runtime.Caller(0)
Clients = make(map[*websocket.Conn]bool)
templPath = filepath.Join(filepath.Dir(filename), "./dashboard.html")
homeTempl, _ = template.ParseFiles(templPath)
upgrader = websocket.Upgrader{
ReadBufferSize: 1024,
WriteBufferSize: 1024,
}
......@@ -44,6 +44,9 @@ func ServeHome(w http.ResponseWriter, r *http.Request) {
http.Error(w, "Method not allowed", http.StatusMethodNotAllowed)
return
}
if !runtime_ok {
panic("Server runtime caller error")
}
var v = struct {
Host string
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment