From 5a48ae24c6f581ce09a16b80d671b84e51a42d1a Mon Sep 17 00:00:00 2001 From: Lei Xue Date: Fri, 6 Nov 2015 17:31:36 +0800 Subject: [PATCH] update test --- test.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/test.go b/test.go index 29dd616..79e7508 100644 --- a/test.go +++ b/test.go @@ -4,12 +4,17 @@ import ( "io" "fmt" "strings" - "terminal" + + "github.com/carmark/pseudo-terminal-go/terminal" ) func main() { - term, _ := terminal.NewWithStdInOut() + term, err := terminal.NewWithStdInOut() + if err != nil { + panic(err) + } defer term.ReleaseFromStdInOut() // defer this + fmt.Println("Ctrl-D to break") term.SetPrompt("root@hello: # ") line, err:= term.ReadLine() for {