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:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user