Documentation
¶
Overview ¶
Package cmdrplugin is a very predecessor for hedzr/cmdr library, which provides the PluginEntry and relevant declarations for cmdr.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PluginCmd ¶
type PluginCmd interface {
PluginCompBase
SubCommands() []PluginCmd
Flags() []PluginFlag
Action(args []string) (err error)
}
PluginCmd a command of an addon
type PluginCompBase ¶
type PluginCompBase interface {
Name() string
ShortName() string
Aliases() []string
Description() string
}
PluginCompBase component for cmd and flag of an addon
type PluginEntry ¶
type PluginEntry interface {
PluginCmd
AddonTitle() string
AddonDescription() string
AddonCopyright() string
AddonVersion() string
}
PluginEntry entry of an addon (golang plugin)
type PluginFlag ¶
type PluginFlag interface {
PluginCompBase
DefaultValue() interface{}
PlaceHolder() string
Action() (err error) // onSet
}
PluginFlag a flag of a command of an addon
Click to show internal directories.
Click to hide internal directories.