Documentation
¶
Index ¶
- Variables
- type Argument
- type ArgumentList
- type Cli
- func (c *Cli) Arguments() []string
- func (c *Cli) Bool(name string) bool
- func (c *Cli) Cancel()
- func (c *Cli) InitProject() (*project.Project, error)
- func (c *Cli) Path() CommandPath
- func (c *Cli) Positional(index int) string
- func (c *Cli) PrintHelp() error
- func (c *Cli) Run() error
- func (c *Cli) Stage(cfgPath string) (string, error)
- func (c *Cli) String(name string) string
- type Command
- type CommandPath
- type Description
- type Example
- type Flag
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrHelp = util.NewReadableError(nil, "")
Functions ¶
This section is empty.
Types ¶
type Argument ¶
type Argument struct {
Name string `json:"name"`
Required bool `json:"required"`
Description Description `json:"description"`
}
type ArgumentList ¶
type ArgumentList []Argument
func (ArgumentList) String ¶
func (a ArgumentList) String() string
type Command ¶
type Command struct {
Name string `json:"name"`
Hidden bool `json:"hidden"`
Description Description `json:"description"`
Args ArgumentList `json:"args"`
Flags []Flag `json:"flags"`
Examples []Example `json:"examples"`
Children []*Command `json:"children"`
Run func(cli *Cli) error `json:"-"`
}
type CommandPath ¶
type CommandPath []Command
func (CommandPath) PrintHelp ¶
func (c CommandPath) PrintHelp() error
type Description ¶
type Example ¶
type Example struct {
Content string `json:"content"`
Description Description `json:"description"`
}
type Flag ¶
type Flag struct {
Name string `json:"name"`
Type string `json:"type"`
Description Description `json:"description"`
}
Click to show internal directories.
Click to hide internal directories.