Removing confusing variable from getDNSDomain, just return "" when disabled

This commit is contained in:
Paul Bellamy committed 2015-09-22 15:09:32 +01:00
1 parent 3e4d8a3ffe
commit 547c9e7f5a
3 files changed
+9 -7

No files matched your search

+7 -5
View File
@@ -395,13 +395,15 @@ func (proxy *Proxy) setWeaveDNS(hostConfig *docker.HostConfig, hostname, dnsDoma
return nil
}
func (proxy *Proxy) getDNSDomain() (domain string, running bool) {
func (proxy *Proxy) getDNSDomain() (domain string) {
if proxy.WithoutDNS {
return "", false
return ""
}
if proxy.WithDNS {
domain = nameserver.DefaultDomain
}
domain = nameserver.DefaultDomain
running = proxy.WithDNS
weaveContainer, err := proxy.client.InspectContainer("weave")
if err != nil ||
weaveContainer.NetworkSettings == nil ||
@@ -421,5 +423,5 @@ func (proxy *Proxy) getDNSDomain() (domain string, running bool) {
return
}
return string(b), true
return string(b)
}