I went and ran my code, and this error only happens when
terminal.MakeRaw() is ran. I've also noticed that this error only happens on windows, and not on linux.
I've never encountered a runtime error before, so I'm not familiar with diagnosing problems like this one.
>go run main.go
panic: The handle is invalid.
goroutine 1 [running]:
main.main()
C:/Users/[usr]/Documents/Programming/go/[Path to Project]
n.go:37 +0x46c
goroutine 2 [runnable]:
runtime.forcegchelper()
c:/go/src/runtime/proc.go:90
runtime.goexit()
c:/go/src/runtime/asm_amd64.s:2232 +0x1
goroutine 3 [runnable]:
runtime.bgsweep()
c:/go/src/runtime/mgc0.go:82
runtime.goexit()
c:/go/src/runtime/asm_amd64.s:2232 +0x1
goroutine 4 [runnable]:
runtime.runfinq()
c:/go/src/runtime/malloc.go:712
runtime.goexit()
c:/go/src/runtime/asm_amd64.s:2232 +0x1
exit status 2
I can share the code upon request if it is deemed necessary.
Thanks in advance.