Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CliOptions ¶
type CliOptions interface {
// Flags 返回一个 NamedFlagSets 对象,包含所有命令行参数
Flags() (fss cliflag.NamedFlagSets)
// Validate 验证命令行参数
Validate() []error
}
CliOptions 命令行选项
type Command ¶
type Command struct {
// contains filtered or unexported fields
}
Command 命令
func NewCommand ¶
func NewCommand(usage string, desc string, opts ...CommandOption) *Command
NewCommand 创建命令
type CompleteableOptions ¶
type CompleteableOptions interface {
Complete() error
}
CompleteableOptions 抽象选项,可以被完成
type PrintableOptions ¶
type PrintableOptions interface {
String() string
}
PrintableOptions 抽象选项,可以被打印
Click to show internal directories.
Click to hide internal directories.