|
@@ -13,10 +13,11 @@ import (
|
|
|
"gopkg.in/mcuadros/go-syslog.v2/format"
|
|
|
)
|
|
|
|
|
|
-// TODO: return a server
|
|
|
-func setupHTTP(hub circolog.Hub) {
|
|
|
- http.HandleFunc("/", getHTTPHandler(hub))
|
|
|
- http.HandleFunc("/ws", getWSHandler(hub))
|
|
|
+func setupHTTP(hub circolog.Hub) *http.ServeMux {
|
|
|
+ mux := http.NewServeMux()
|
|
|
+ mux.HandleFunc("/", getHTTPHandler(hub))
|
|
|
+ mux.HandleFunc("/ws", getWSHandler(hub))
|
|
|
+ return mux
|
|
|
}
|
|
|
|
|
|
func parseParameterL(r *http.Request) (int, error) {
|