I can't read much of Go so can anyone explain how does this work at a high-level? The Vim editing example looks really cool! Does it keep taking a snapshot of the running command and send the data via a websocket?
^ Those are the key lines really.
It's running the command in a pseudo-terminal, capturing the output (as text) and sending it over a web socket.