Documentation ¶
Overview ¶
manages main executable as agglomeration of tools.
Index ¶
- func ConditionalRun(msg string, def bool, runTrue, runFalse func())
- func ConfirmYorN(msg string, def bool) (bool, error)
- func Description(i Interface) string
- func Flags(i Interface) *flag.FlagSet
- func FlagsWithDoc(i Interface, doc string) *flag.FlagSet
- func FormatTextTable(borders bool, prefix string, cols []string, rows []map[string]string) string
- func ListTools(names []string)
- func MyTestCommand(parser FlagParser)
- func Name(i Interface) string
- func Names() (out []string)
- func Register(r Interface)
- func RegisterChild(parent string, child Interface)
- func Run()
- func RunInterface(i Interface, args []string)
- type CanRun
- type Command
- type CommandFunc
- type Commands
- type FlagParser
- type HasDescription
- type HasName
- type Interface
- type RunFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConditionalRun ¶
func Description ¶
func FormatTextTable ¶
func MyTestCommand ¶
func MyTestCommand(parser FlagParser)
func RegisterChild ¶
func RunInterface ¶
Types ¶
type Command ¶
type Command interface { Name() string Description() string Children() Commands Add(Command) Run(FlagParser) }
func Wrapper ¶
func Wrapper(name, desc string, f CommandFunc) Command
type CommandFunc ¶
type CommandFunc func(p FlagParser)
type FlagParser ¶
type HasDescription ¶
type HasDescription interface {
Description() string
}
type HasName ¶
type HasName interface {
Name() string // no dots before optional comma, description after
}
Click to show internal directories.
Click to hide internal directories.