Versions in this module Expand all Collapse all v5 v5.1.2 Oct 19, 2023 v5.1.1 Sep 26, 2023 Changes in this version + var ErrDuplicate = errors.New("duplicated response") + var ErrInvalid = errors.New("invalid response") + var ErrNoResponse = errors.New("no response") + var ErrTooMany = errors.New("too many responses") + func Clear() + func IsDuplicateErr(err error) bool + func IsInvalidErr(err error) bool + func IsMenuErr(err error) bool + func IsNoResponseErr(err error) bool + func IsTooManyErr(err error) bool + type DefaultYN int + const DefN + const DefY + type Menu struct + func NewMenu(question string) *Menu + func (m *Menu) Action(function func([]Opt) error) + func (m *Menu) AddColor(optionColor, questionColor, responseColor, errorColor wlog.Color) + func (m *Menu) AllowMultiple() + func (m *Menu) ChangeReaderWriter(reader io.Reader, writer, errorWriter io.Writer) + func (m *Menu) ClearOnMenuRun() + func (m *Menu) InitialIndex(index int) + func (m *Menu) IsYesNo(def DefaultYN) + func (m *Menu) LoopOnInvalid() + func (m *Menu) Option(title string, value interface{}, isDefault bool, function func(Opt) error) + func (m *Menu) PadOptionID() + func (m *Menu) Run() error + func (m *Menu) SetDefaultIcon(icon string) + func (m *Menu) SetSeparator(sep string) + func (m *Menu) SetTries(i int) + type MenuError struct + Err error + Res string + TriesLeft int + func (e *MenuError) Error() string + type Opt struct + ID int + Text string + Value interface{} Other modules containing this package github.com/godoes/wmenu