ads1_2021/code/golang/internal/menus/menus_type.go

27 lines
618 B
Go
Raw Normal View History

package menus
/* ---------------------------------------------------------------- *
* IMPORTS
* ---------------------------------------------------------------- */
//
/* ---------------------------------------------------------------- *
* TYPES
* ---------------------------------------------------------------- */
type MenuOption struct {
Label string
SubLabel string
Submenu *Menu
Action func() error // NOTE: in go, this is automatically a pointer type
}
type Menu struct {
IsRoot bool
Path []string
PromptMessages []string
Options []MenuOption
DefaultOption int
}