You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When setting the terminal color, ansicolor uses the file handle syscall.Stdout for the windows system calls.
In my use case, this is not sufficient. I am compiling my go application as a windows GUI application (no terminal) and, if the command-line argument "-console" is provided, I allocate a new console.
I managed to solve this issue by overwriting syscall.Stdout, syscall.Stderr and syscall.Stdin to the streams acquired after creating a new terminal window (Before, my code only overwrote os.Stdout/err/in).
I suppose it is not an intended use case to overwrite these exported variables, but on the other hand go itself doesn't seep to support attaching different terminal windows at runtime.
When setting the terminal color, ansicolor uses the file handle
syscall.Stdout
for the windows system calls.In my use case, this is not sufficient. I am compiling my go application as a windows GUI application (no terminal) and, if the command-line argument "-console" is provided, I allocate a new console.
I'm using the following syscalls for that:
As a result, the syscall.stdout handle (=1) is not correct, but there is no way to configure another window handle.
The text was updated successfully, but these errors were encountered: