From d1105b75569ccfa4f321f445a9d25a0b47e6a5a0 Mon Sep 17 00:00:00 2001 From: MichaelOultram Date: Thu, 30 Jul 2015 15:14:30 +0100 Subject: [PATCH] Fixing build issues --- main.go | 2 +- web.go | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/main.go b/main.go index 16cdbc7..4849776 100644 --- a/main.go +++ b/main.go @@ -172,7 +172,7 @@ var dj = mumbledj{ cache: NewSongCache(), } -var web *WebServer +var web WebServer // main primarily performs startup tasks. Grabs and parses commandline // args, sets up the gumble client and its listeners, and then connects to the server. diff --git a/web.go b/web.go index c0cc4c1..4bb9c19 100644 --- a/web.go +++ b/web.go @@ -27,8 +27,8 @@ type Page struct { var external_ip = "" -func makeWebserver(port int) *WebServer { - webserver := &WebServer{port, make(map[*gumble.User]string), make(map[string]*gumble.User)} +func makeWebserver(port int) WebServer { + webserver := WebServer{port, make(map[*gumble.User]string), make(map[string]*gumble.User)} http.HandleFunc("/", webserver.homepage) http.HandleFunc("/add", webserver.add) @@ -40,7 +40,7 @@ func makeWebserver(port int) *WebServer { return webserver } -func (web *WebServer) homepage(w http.ResponseWriter, r *http.Request) { +func (web WebServer) homepage(w http.ResponseWriter, r *http.Request) { var uname = web.token_client[r.URL.Path[1:]] if uname == nil { fmt.Fprintf(w, "Invalid Token") @@ -50,7 +50,7 @@ func (web *WebServer) homepage(w http.ResponseWriter, r *http.Request) { } } -func (web *WebServer) add(w http.ResponseWriter, r *http.Request) { +func (web WebServer) add(w http.ResponseWriter, r *http.Request) { var uname = web.token_client[r.FormValue("token")] if uname == nil { fmt.Fprintf(w, "Invalid Token") @@ -59,7 +59,7 @@ func (web *WebServer) add(w http.ResponseWriter, r *http.Request) { } } -func (web *WebServer) volume(w http.ResponseWriter, r *http.Request) { +func (web WebServer) volume(w http.ResponseWriter, r *http.Request) { var uname = web.token_client[r.FormValue("token")] if uname == nil { fmt.Fprintf(w, "Invalid Token") @@ -69,7 +69,7 @@ func (web *WebServer) volume(w http.ResponseWriter, r *http.Request) { } } -func (web *WebServer) skip(w http.ResponseWriter, r *http.Request) { +func (web WebServer) skip(w http.ResponseWriter, r *http.Request) { var uname = web.token_client[r.FormValue("token")] if uname == nil { fmt.Fprintf(w, "Invalid Token")