diff options
| author | Jeff Carr <[email protected]> | 2024-01-27 12:55:27 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-01-27 12:55:27 -0600 |
| commit | 267c941790e4c42ac207322a8d4fdc011fc8ee10 (patch) | |
| tree | 79ddd7104799815d3397f9c38d9aba552cdcd779 /stdin.go | |
| parent | 4445695b68d43ed9ddb679ca105b407a725ed54a (diff) | |
clearer STDOUT interfacev0.13.18
Signed-off-by: Jeff Carr <[email protected]>
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() } } |
