menu

package
v0.0.0-...-3b6f8d4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 4, 2024 License: GPL-3.0, MIT Imports: 4 Imported by: 0

Documentation

Overview

With thanks to Luke Jennings. https://github.com/Nexidian/gocliselect

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Menu struct {
	Prompt    string
	CursorPos int
	MenuItems []*MenuItem
}

func NewMenu

func NewMenu(prompt string) *Menu
func (m *Menu) AddItem(option string, id string) *Menu

AddItem will add a new menu option to the menu list

func (m *Menu) Display() string
type MenuItem struct {
	Text    string
	ID      string
	SubMenu *Menu
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL