diff options
Diffstat (limited to 'sd.go')
-rw-r--r-- | sd.go | 15 |
1 files changed, 13 insertions, 2 deletions
@@ -1,9 +1,20 @@ package main import ( - "fmt" + "flag" + "os" + + "golang.org/x/term" ) +var file = flag.String("f", "cards", "cards file") + func main() { - fmt.Println("hello world") + flag.Parse() + + oldState, err := term.MakeRaw(int(os.Stdin.Fd())) + if err != nil { + panic(err) + } + defer term.Restore(int(os.Stdin.Fd()), oldState) } |