code: func (conn *WebsocketConnection) startPingInterval() {
  	go func() {
  		for {
  			select {
  			case <-conn.closedChan:
  				return
  			case <-time.After(conn.pingInterval):
  				func() {
  					conn.writeMutex.Lock()
  					defer conn.writeMutex.Unlock()
  					conn.ws.WriteControl(websocket.PingMessage, []byte{}, time.Now().Add(conn.writeTimeout))
  				}()
  			}
  		}
  	}()
  }
docs: // Begins a goroutine to send a periodic ping to the other end