Closed Not-Nik closed 5 years ago
What OS and shell/terminal are you running? I can't reproduce this on macOS with Terminal.app.
Also your example program won't terminate on Escape the way you probably intend it to :). The break
will break out of the switch
statement. You need a labeled break on the loop, or set a flag that terminates the loop.
So, I'm on a Mac too (Mojave, MacBook Air 2013) but I've been running this via GoLand. When I execute it with the Terminal, I don't get this error and everything works fine(with your tip)... Strange...
Are you running it from a terminal in GoLang or directly from the IDE via a Run Configuration? If the latter then this seems logical since presumably there wouldn't be a terminal. In that case, I would say this is not an issue with termbox.
Yeah, I was trying to run it via a Run Config. Thanks for your help.
It's too bad -- it would be great to be able to run a Run Config attached to an integrated terminal. Debugging would be much more convenient.
Looks like this is the JetBrains issue that tracks this feature request: https://youtrack.jetbrains.com/issue/IDEABKL-6701
It sounds like in PyCharm specifically there is maybe some support for this: https://youtrack.jetbrains.com/issue/PY-19938 but I'm not seeing anything for IntelliJ generally or for Go.
When I try to execute this code:
I get this error