I'm trying to write a little web app that is very similar to the command line terminal, but that I can use to analyze data interactively.
The window only contains 2 text boxes - one at the bottom (the command box) and the other (the output box) that takes up the rest of the screen.
Right now, let's say I issue a command to load a ton of files into memory. "load <dir>"
In the background, a goroutine actually does the work and writes the text output (when its ready) to a string channel which is read from.
I have a display goroutine that reads from that channel and sets the text on the display text box.
My problem is that the display text box only updates the next time an event from the command text box comes in.
In other words, I issue a command in one text box. After a delay, the result is ready and I would like to make the other text update its contents.
How do I accomplish this?