According Gorilla Websockets Project it is not possible to send pings and pongs using golang.org/x/net/websocket
The Gorilla README says something different. It says that the golang.org/x/net package cannot send a ping or receive a pong. It does not say that the package will not send a pong.
The golang.org/x/net package automatically responds to a ping received from the peer by sending a pong to the peer, as does the Gorilla package. Both packages work correctly with a peer that's using ping and pongs to keep the connection alive.
An application that uses the golang.org/x/net/websocket package cannot employ pings and pongs to keep the connection alive. There's no way to send the ping. There's no way to detect that the pong was received.