err=fmt.Errorf("Got %d values for parameter '%s' but expected only one: %s",valuesCount,param,values)
return
}
// clients holds the clients that are connected to the event handler. It is used to broadcast state changes to all SSE (Server-Sent Events) clients.
// Note: the only reason we use a sse.Client => bool map is that we can call *delete* with the client as key. The actual bool value that is stored holds no significance whatsoever.
// This is basically a *set* in go.
...
...
@@ -56,53 +76,65 @@ func stateHandleFunc(w http.ResponseWriter, r *http.Request) {
// we save the error messages of the 3 parsing steps here.