Documentation ¶
Overview ¶
Package menu fork of https://github.com/turret-io/go-menu
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommandOption ¶
type CommandOption struct { Description string Color color.Attribute Function func(args ...string) error }
CommandOption main struct to handle options for Description, and the function that should be called
type Menu ¶
type Menu struct { Commands []CommandOption Options Options }
Menu struct encapsulates Commands and Options
func NewMenu ¶
func NewMenu(cmds []CommandOption, options Options) *Menu
NewMenu creates a new menu with options
type Options ¶
Options sets name, prompt, character width of menu, and command used to display the menu
func NewOptions ¶
NewOptions to setup the options for the menu. An empty string for prompt and a length of 0 will use the default "> " prompt and 100 character wide menu. An empty string for menuCommand will use the default 'menu' command.
Click to show internal directories.
Click to hide internal directories.