You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
288 B
16 lines
288 B
2 years ago
|
package main
|
||
|
|
||
|
import (
|
||
|
"os"
|
||
|
|
||
|
"golang.org/x/sys/windows"
|
||
|
)
|
||
|
|
||
|
func init() {
|
||
|
var outMode uint32
|
||
|
out := windows.Handle(os.Stdout.Fd())
|
||
|
if err := windows.GetConsoleMode(out, &outMode); err == nil {
|
||
|
_ = windows.SetConsoleMode(out, outMode|windows.ENABLE_VIRTUAL_TERMINAL_PROCESSING)
|
||
|
}
|
||
|
}
|