Fix golint errors in docker/api/client

Signed-off-by: Peggy Li <peggyli.224@gmail.com>
Upstream-commit: 58065d0dd9adec4b2f397a453652cc8cc7237a17
Component: engine
This commit is contained in:
Peggy Li
2015-04-21 23:45:18 -07:00
parent 1b7f0b8878
commit ed4e61e70a
5 changed files with 22 additions and 10 deletions

View File

@ -97,6 +97,11 @@ func (cli *DockerCli) Cmd(args ...string) error {
return cli.CmdHelp()
}
// 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".
func (cli *DockerCli) Subcmd(name, signature, description string, exitOnError bool) *flag.FlagSet {
var errorHandling flag.ErrorHandling
if exitOnError {
@ -121,6 +126,8 @@ func (cli *DockerCli) Subcmd(name, signature, description string, exitOnError bo
return flags
}
// CheckTtyInput checks if we are trying to attach to a container tty
// from a non-tty client input stream, and if so, returns an error.
func (cli *DockerCli) CheckTtyInput(attachStdin, ttyMode bool) error {
// In order to attach to a container tty, input stream for the client must
// be a tty itself: redirecting or piping the client standard input is