Remove used param on ParseHost

The first param on opts.ParseHost() wasn't being used for anything.

Once we get rid of that param we can then also clean-up some code
that calls ParseHost() because the param that was passed in wasn't
being used for anything else.

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: ba973f2d74c150154390aed1a5aed8fb5d0673b8
Component: engine
This commit is contained in:
Doug Davis
2015-10-11 20:45:17 -07:00
parent b34ed2cbab
commit bb94a5ee85
4 changed files with 6 additions and 13 deletions
+2 -7
View File
@@ -105,20 +105,15 @@ func NewDockerCli(in io.ReadCloser, out, err io.Writer, clientFlags *cli.ClientF
switch len(hosts) {
case 0:
defaultHost := os.Getenv("DOCKER_HOST")
hosts = []string{defaultHost}
hosts = []string{os.Getenv("DOCKER_HOST")}
case 1:
// only accept one host to talk to
default:
return errors.New("Please specify only one -H")
}
defaultHost := opts.DefaultTCPHost
if clientFlags.Common.TLSOptions != nil {
defaultHost = opts.DefaultTLSHost
}
var e error
if hosts[0], e = opts.ParseHost(defaultHost, hosts[0]); e != nil {
if hosts[0], e = opts.ParseHost(hosts[0]); e != nil {
return e
}