Documentation
¶
Overview ¶
Package cmdopt 用于创建子命令功能的命令行
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CmdOpt ¶
type CmdOpt struct {
// 表示输出的通道,此值必须指定;
Output io.Writer
// 表示出错时的处理方式,该值最终会被传递给子命令;
ErrorHandling flag.ErrorHandling
// Header、Footer、OptionsTitle 和 CommandsTitle 作为输出帮助信息中的部分内容,
// 由用户给出。
// 帮助信息的模板如下:
// {Header}
// {CommandsTitle}:
// cmd1 cmd1 usage
// cmd2 cmd2 usage
// {Footer}
// 子命令的帮助信息模板如下:
// usage
// {OptionsTitle}:
// -flag1 flag1 usage
// -flag2 flag2 usage
Header string
CommandsTitle string
OptionsTitle string
// 在找不到子命令时显示的额外信息
//
// 其中参数为子命令的名称。
NotFound func(string) string
// contains filtered or unexported fields
}
CmdOpt 带子命令的命令行操作
Click to show internal directories.
Click to hide internal directories.