Documentation ¶
Overview ¶
Package modes contains all subcommands (called "modes").
MCPM starts mode by its name given in a command line.
To create a mode. Create new Go source file in this package directory and follow that example:
func anyname(mo *ModeOptions) { // Do something there } func init() { registerMode("command-name", anyname); }
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LaunchMode ¶
func LaunchMode(m string)
LaunchMode finds mode by its name and run this with set mode options. If mode is not found, LaunchMode shows usage of command.
Types ¶
type Mode ¶
type Mode struct { Func func(*Mode, *ModeOptions) Usage string RunBefore *Mode RunAfter *Mode }
Mode contains functions needed in specific order. (EXPERIMENTAL)
func (*Mode) Run ¶
func (m *Mode) Run(mo *ModeOptions)
type ModeList ¶
type ModeList map[string]func(*ModeOptions)
ModeList contains modes associated with unique name.
Click to show internal directories.
Click to hide internal directories.