Commit ad69c1d

Per Persson <md2perpe+github@gmail.com>
2017-04-01 14:32:13
Make URL an argument to Connect
Now the file needs not be modified for setting the URL. The programmer instead passes the URL to Connect().
1 parent 28e21e4
Changed files (1)
place.go
@@ -7,11 +7,10 @@ import (
 	"time"
 )
 
-func Connect() (c *websocket.Conn, err error) {
+func Connect(url string) (c *websocket.Conn, err error) {
 	dialer := &websocket.Dialer{}
 	dialer.EnableCompression = false
-	place_url := "YOUR WSS URL HERE"
-	c, _, err = dialer.Dial(place_url, nil)
+	c, _, err = dialer.Dial(url, nil)
 	if err != nil {
 		return c, err
 	}