Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Command ¶
type Command struct {
// contains filtered or unexported fields
}
func (*Command) AddCommand ¶
func (*Command) AddCommands ¶
type CompleteableOptions ¶
type CompleteableOptions interface {
Complete() error
}
CompleteableOptions 抽象可以完成/编译的options
type ConfigurableOptions ¶
type ConfigurableOptions interface {
ApplyFlags() []error
}
ConfigurableOptions 抽象用于从配置文件读取参数的配置选项。
type FlagInterface ¶
type FlagInterface interface { // Flags 添加命令行 Flags() (fs FlagSet) // Validate 验证 Validate() []error }
FlagInterface 命令行读取配置
type Option ¶
type Option func(*App)
func WithConfig ¶
func WithDescription ¶
func WithFlags ¶
func WithFlags(fi FlagInterface) Option
func WithRunFunc ¶
func WithVersion ¶
type PrintableOptions ¶
type PrintableOptions interface {
String() string
}
PrintableOptions 抽象可以打印的options
type RunCommandFunc ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.