mirror of https://github.com/kubernetes/kops.git
Simplify boolean returns
This commit is contained in:
parent
b9448cabe5
commit
669c47c4ed
|
@ -66,10 +66,7 @@ func (c *openstackCloud) CreateInstance(opt servers.CreateOptsBuilder, scheduler
|
||||||
}
|
}
|
||||||
|
|
||||||
func IsPortInUse(err error) bool {
|
func IsPortInUse(err error) bool {
|
||||||
if gophercloud.ResponseCodeIs(err, http.StatusConflict) {
|
return gophercloud.ResponseCodeIs(err, http.StatusConflict)
|
||||||
return true
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// waitForStatusActive uses gopherclouds WaitFor() func to determine when the server becomes "ACTIVE".
|
// waitForStatusActive uses gopherclouds WaitFor() func to determine when the server becomes "ACTIVE".
|
||||||
|
|
|
@ -131,10 +131,7 @@ func (tf *TemplateFunctions) AddTo(dest template.FuncMap, secretStore fi.SecretS
|
||||||
}
|
}
|
||||||
|
|
||||||
dest["GossipEnabled"] = func() bool {
|
dest["GossipEnabled"] = func() bool {
|
||||||
if cluster.UsesLegacyGossip() {
|
return cluster.UsesLegacyGossip()
|
||||||
return true
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
}
|
||||||
dest["PublishesDNSRecords"] = func() bool {
|
dest["PublishesDNSRecords"] = func() bool {
|
||||||
return cluster.PublishesDNSRecords()
|
return cluster.PublishesDNSRecords()
|
||||||
|
|
Loading…
Reference in New Issue