Versions in this module Expand all Collapse all v0 v0.3.0 Feb 15, 2024 Changes in this version + const GroupID + var ErrNegativeIndex = errors.New("cannot use a negative index when requesting historic commands") + var ErrOpenHistoryFile = errors.New("failed to open history file") + func EmbeddedHistory(file string, maxLines int, enableLocal ...bool) (readline.History, error) + func ExitCtrlD(c *console.Console) + func GetFlagKey(parent, child string) string + func SetupPrompt(m *console.Menu) + func SwitchMenu(c *console.Console) + type Flag struct + Default string + Name string + Short string + Type FlagType + Usage string + func (f *Flag) GetDefault() string + func (f *Flag) GetName() string + func (f *Flag) GetShort() string + func (f *Flag) GetType() FlagType + func (f *Flag) GetUsage() string + type FlagType string + const OptionTypeBool + const OptionTypeFloat + const OptionTypeInt + const OptionTypeString + type IShell struct + Console *console.Console + History readline.History + SetPrompt func(*console.Menu) + func NewIShell() (s *IShell) + func (s *IShell) AddChild(parent string, command *ShellCmd) + func (s *IShell) AddCmd(command *ShellCmd) + func (s *IShell) SetHistoryFilePath(fPath string, maxLine int, enableLocal ...bool) + func (s *IShell) SetPrintLogo(f func(_ *console.Console)) + func (s *IShell) SetupPrompt(setp func(*console.Menu)) + func (s *IShell) Start() error + type IShellFlag interface + GetDefault func() string + GetName func() string + GetShort func() string + GetType func() FlagType + GetUsage func() string + type Item struct + Block string + DateTime time.Time + Index int + type ShellCmd struct + Children []*ShellCmd + HelpStr string + LongHelpStr string + Name string + Options []*Flag + Parent string + Run func(cmd *cobra.Command, args []string) + func NewShellCmd() (sc *ShellCmd) + func (s *ShellCmd) AddChild(child *ShellCmd)