2
2
mirror of https://github.com/Hilbis/Hilbish synced 2025-04-01 11:13:24 +00:00

fix: broken ansi escape codes on windows cmd

This commit is contained in:
TorchedSammy 2022-05-28 09:07:28 -04:00
parent 9d385efbfc
commit e3c25586e4
Signed by: sammyette
GPG Key ID: 904FC49417B44DCD

11
init_windows.go Normal file
View File

@ -0,0 +1,11 @@
// +build windows
package main
import "golang.org/x/sys/windows"
func init() {
var mode uint32
windows.GetConsoleMode(windows.Stdout, &mode)
windows.SetConsoleMode(windows.Stdout, mode | windows.ENABLE_VIRTUAL_TERMINAL_PROCESSING)
}