Versions in this module Expand all Collapse all v0 v0.1.0 May 12, 2021 Changes in this version + const AddHelpPageStatusNew + const AddHelpPageStatusUpdated + const PolicyAsk + const PolicyIgnore + const PolicyTrust + const PolicyUnknown + var CurrentSchemaVersion = 1 + var ErrAppPathIsEmpty = fmt.Errorf("executable path cannot be empty") + func CanonizeExecutablePath(name, workDir, pathVar, homeDir string) (canonized string, err error) + func CheckExecutablePath(executablePath string) error + func CheckHelpPage(helpPage *HelpPage) (err error) + func IsCommandMatchingContext(command []string, context FlagContext) bool + type AddHelpPageStatus string + type Command struct + Args []string + Dir string + Env []string + type Completion struct + Context FlagContext + Flag string + type FlagContext struct + Framework string + SubCommand []string + type HelpPage struct + CheckSum string + Command Command + Completions []Completion + ExecutablePath string + type Policy string + type Storage interface + AddHelpPage func(helpPage *HelpPage, policy Policy) (status AddHelpPageStatus, err error) + Close func() error + GetAllCompletions func() (pages []HelpPage, err error) + GetCommandPolicy func(args []string) (policy Policy, err error) + GetCompletions func(path string) (completions []Completion, err error) + ListCommands func() (result map[int64]*Command, err error) + RemoveHelpPage func(commandId int64) (path string, err error) + func NewSqliteStorage(fileName string) (storage Storage, err error)