Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Subcmd ¶
Subcmd is a subcommand of the main "docker" command. A subcommand represents an action that can be performed from the Docker command line client.
To see all available subcommands, run "docker --help". SubCmd 是"docker"命令的子命令 一个子命令代表一个可以被Docker 命令行客户端完成的动作
要查看所有可用的子命令,运行 "docker --help".
Types ¶
type Cli ¶
Cli represents a command line interface. Cli 结构体是一个命令行接口
func (*Cli) CmdHelp ¶
CmdHelp displays information on a Docker command.
If more than one command is specified, information is only shown for the first command.
Usage: docker help COMMAND or docker COMMAND --help CmdHelp 在Docker命令行上显示提示信息
如果指定了多个命令,只显示第一个命令的提示信息
用法:docker help COMMAND 或者 docker COMMAND --help
type ClientFlags ¶
type ClientFlags struct { FlagSet *flag.FlagSet Common *CommonFlags PostParse func() ConfigDir string }
ClientFlags represents flags for the docker client. ClientFlags 结构体代表docker client的标记信息
type CommonFlags ¶
type CommonFlags struct { FlagSet *flag.FlagSet PostParse func() Debug bool Hosts []string LogLevel string TLS bool TLSVerify bool TLSOptions *tlsconfig.Options TrustKey string }
CommonFlags represents flags that are common to both the client and the daemon. CommonFlags 结构包含对于docker 客户端和守护进程通用的标记信息
type Handler ¶
type Handler interface{}
Handler holds the different commands Cli will call It should have methods with names starting with `Cmd` like:
func (h myHandler) CmdFoo(args ...string) error
Handler接口 可以表示Cli将要调用的不同命令 命令方法名必须以'Cmd'开头,例如: func (h myHandler) CmdFoo(args ...string) error
type Initializer ¶
type Initializer interface {
Initialize() error
}
Initializer can be optionally implemented by a Handler to initialize before each call to one of its commands. Initializer接口 可以被一个Handler作为可选实现, Initializer接口在调用每一个Handler命令之前进行初始化
type StatusError ¶
An StatusError reports an unsuccessful exit by a command. StatusError 结构体报告命令的非正常退出
func (StatusError) Error ¶
func (e StatusError) Error() string