func ServeWs(w http.ResponseWriter, r *http.Request) {
	conn, err := upgrader.Upgrade(w, r, nil)
	if err != nil {
		if _, ok := err.(websocket.HandshakeError); !ok {
			log.Println(err)
		}
		return
	}
	webSocketConnections = append(webSocketConnections, conn)
}
ServeWs serves web socket connection
package pinggraph
import (
	"fmt"
	"log"
	"net/http"
	"github.com/gorilla/websocket"
)
var upgrader = websocket.Upgrader{}
func ServeHome(w http.ResponseWriter, r *http.Request) {
	log.Println(r.URL)
	if r.URL.Path != "/" {
		http.Error(w, "Not found", http.StatusNotFound)
		return
	}
	if r.Method != "GET" {
		http.Error(w, "Method not allowed", http.StatusMethodNotAllowed)
		return
	}
	fmt.Fprintf(w, homeTemplate)
}