Documentation
¶
Overview ¶
Package cli is the core of a Go stack's tool: the commands every stack answers, with what differs by framework in a Preset.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Command ¶
type Command struct {
Name string
// Operands follow the name in the usage.
Operands string
Description string
Run func(args []string) error
}
Command is one of an adapter's own. It works where the process does: Run's dir is for rules and agents.
type Preset ¶
type Preset struct {
// Tool is how a service runs the adapter: `go tool specrig`.
Tool string
// Version is the adapter with its version, as specrig.md names what wrote it.
Version string
Layout rules.Layout
// Areas are the stack's defaults for the service in dir.
Areas func(dir string) ([]rules.Area, error)
// Slots are agents/1's, but for those the core fills.
Slots map[string]string
// Own are the sections of specrig.md after Rule #11.
Own []string
// Commands are the adapter's own, beside init, rules and agents.
Commands []Command
// Init lays out what the stack's suite needs, after init's own files, where
// the process works.
Init func() error
}
Preset is what a framework's adapter hands the core.
Click to show internal directories.
Click to hide internal directories.