aboutsummaryrefslogtreecommitdiff
path: root/pkg/client/menu.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/client/menu.go')
-rw-r--r--pkg/client/menu.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/pkg/client/menu.go b/pkg/client/menu.go
new file mode 100644
index 0000000..f6de082
--- /dev/null
+++ b/pkg/client/menu.go
@@ -0,0 +1,17 @@
+package client
+
+import "fmt"
+
+func (s *State) displayMenu() {
+ menu := s.config.Menus[s.currentMenu]
+ fmt.Print("\033[2J") // clear the screen
+ fmt.Printf("%s\n\n", menu.Banner)
+ if s.login == "" {
+ fmt.Print("Not logged in.\n\n")
+ } else {
+ fmt.Printf("Logged in as: %s\n\n", s.login)
+ }
+ for i := 0; i < len(menu.MenuEntries); i++ {
+ fmt.Printf("%s) %s\n", menu.MenuEntries[i].Key, menu.MenuEntries[i].Label)
+ }
+}