diff options
Diffstat (limited to 'stdin.go')
| -rw-r--r-- | stdin.go | 22 |
1 files changed, 15 insertions, 7 deletions
@@ -12,6 +12,19 @@ import ( "go.wit.com/widget" ) +func showOptions() { + fmt.Println("") + fmt.Println("Enter:") + fmt.Println("'l': list all widgets") + fmt.Println("'b': for buttons") + fmt.Println("'g': load gocui plugin") + fmt.Println("'a': load andlabs plugin") + fmt.Println("'d': enable debugging") + fmt.Println("") + fmt.Println("Enter the number of the widget to click:") + fmt.Print("Option: ") +} + func simpleStdin() { defer func() { if r := recover(); r != nil { @@ -41,13 +54,7 @@ func simpleStdin() { case "d": me.myTree.SendEnableDebugger() case "": - fmt.Println("") - fmt.Println("Enter:") - fmt.Println("'l': list all widgets") - fmt.Println("'b': for buttons") - fmt.Println("'g': load gocui plugin") - fmt.Println("'a': load andlabs plugin") - fmt.Println("'d': enable debugging") + showOptions() default: i, _ := strconv.Atoi(s) log.Log(NOW, "got input:", i) @@ -71,5 +78,6 @@ func simpleStdin() { } } } + showOptions() } } |
