How is it possible to close a websocket connection and pass it a message / code?
The docs only define func (ws *Conn) Close() error
without any arguments
I would like to receive the event from JavaScript like this:
websocket.onclose = function(event) {
console.log(event);
};
I am using golang.org/x/net/websocket