We use the go-socket.io package to run a socket server and we need to authenticate users with handshake query data. In node.js we used code like:
go-socket.io
node.js
authDataString = socket.handshake.query.authData;
and we need to do something similar in Go.
You can use the Request field of a socket to get query parameters from the request URL using FormValue:
Request
socket
FormValue
log.Print(socket.Request().FormValue("foo"))