Created
December 31, 2018 13:36
-
-
Save hymkor/0809d544f4e509434a93ac63459dd18c to your computer and use it in GitHub Desktop.
現在のコンソールのモードを確認する(git.exe が push 時に勝手に変えてそうだったので)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// +build ignore | |
package main | |
import ( | |
"fmt" | |
"os" | |
"golang.org/x/sys/windows" | |
) | |
func main() { | |
var mode uint32 | |
err := windows.GetConsoleMode(windows.Stdin, &mode) | |
if err != nil { | |
fmt.Fprintln(os.Stderr, err) | |
} else { | |
fmt.Printf("%08b\n", mode) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment