 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- Variables
- type Command
- type Commands
- func (c Commands) Find(name string, hereDepth, hereDist int, skipFirst bool) (found bool, depth, dist int, cm *Command, e error)
- func (c Commands) ForEach(fn func(Command) bool, hereDepth, hereDist int) (ret bool, depth, dist int, e error)
- func (c Commands) GetAllCommands() (o []string)
- func (c Commands) PopulateParents(parent *Command)
 
Constants ¶
This section is empty.
Variables ¶
      View Source
      
  
var F, E, W, I, D, T log.LevelPrinter = log.GetLogPrinterSet(subsystem)
    Functions ¶
This section is empty.
Types ¶
type Command ¶
type Command struct {
	Name        string
	Title       string
	Description string
	Entrypoint  func(c interface{}) error
	Commands    Commands
	Colorizer   func(a ...interface{}) string
	AppText     string
	Parent      *Command
}
    Command is a specification for a command and can include any number of subcommands
type Commands ¶
type Commands []Command
Commands are a slice of Command entries
func (Commands) Find ¶
func (c Commands) Find( name string, hereDepth, hereDist int, skipFirst bool, ) (found bool, depth, dist int, cm *Command, e error)
Find the Command you are looking for. Note that the namespace is assumed to be flat, no duplicated names on different levels, as it returns on the first one it finds, which goes depth-first recursive
func (Commands) GetAllCommands ¶
GetAllCommands returns all of the available command names
func (Commands) PopulateParents ¶
 Click to show internal directories. 
   Click to hide internal directories.