{"modulePath":"github.com/hyperhq/hypercli","version":"v1.10.16","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package cli\n\n## Variables\n\n```go\nvar DockerCommands = make(map[string]Command)\n```\nDockerCommands stores all the docker command\n\n## Functions\n\n```go\nfunc Subcmd(name string, synopses []string, description string, exitOnError bool) *flag.FlagSet\n```\nSubcmd is a subcommand of the main \"docker\" command. A subcommand represents an action that can be performed from the Docker command line client.\n\nTo see all available subcommands, run \"docker --help\".\n\n## Types\n\n```go\ntype Cli struct {\n\tStderr io.Writer\n\n\tUsage func()\n\t// contains filtered or unexported fields\n}\n```\nCli represents a command line interface.\n\n```go\nfunc New(handlers ...Handler) *Cli\n```\nNew instantiates a ready-to-use Cli.\n\n```go\nfunc (cli *Cli) CmdHelp(args ...string) error\n```\nCmdHelp displays information on a Docker command.\n\nIf more than one command is specified, information is only shown for the first command.\n\nUsage: docker help COMMAND or docker COMMAND --help\n\n```go\nfunc (cli *Cli) Run(args ...string) error\n```\nRun executes the specified command.\n\n```go\ntype ClientFlags struct {\n\tFlagSet   *flag.FlagSet\n\tCommon    *CommonFlags\n\tPostParse func()\n\n\tConfigDir string\n}\n```\nClientFlags represents flags for the docker client.\n\n```go\ntype Command struct {\n\tName        string\n\tDescription string\n}\n```\nCommand is the struct contains command name and description\n\n```go\ntype CommonFlags struct {\n\tFlagSet   *flag.FlagSet\n\tPostParse func()\n\n\tDebug      bool\n\tRegion     string\n\tLogLevel   string\n\tTLS        bool\n\tTLSVerify  bool\n\tTLSOptions *tlsconfig.Options\n\tTrustKey   string\n}\n```\nCommonFlags represents flags that are common to both the client and the daemon.\n\n```go\ntype Handler interface{}\n```\nHandler holds the different commands Cli will call It should have methods with names starting with \\`Cmd\\` like:\n\n\tfunc (h myHandler) CmdFoo(args ...string) error\n\n```go\ntype Initializer interface {\n\tInitialize() error\n}\n```\nInitializer can be optionally implemented by a Handler to initialize before each call to one of its commands.\n\n```go\ntype StatusError struct {\n\tStatus     string\n\tStatusCode int\n}\n```\nAn StatusError reports an unsuccessful exit by a command.\n\n```go\nfunc (e StatusError) Error() string\n```\n\n","path":"github.com/hyperhq/hypercli/cli","name":"cli","synopsis":"","isRedistributable":true}
