Simplify boolean returns

This commit is contained in:
Peter Rifel 2025-08-22 20:25:23 -05:00
parent b9448cabe5
commit 669c47c4ed
No known key found for this signature in database
2 changed files with 2 additions and 8 deletions

View File

@ -66,10 +66,7 @@ func (c *openstackCloud) CreateInstance(opt servers.CreateOptsBuilder, scheduler
}
func IsPortInUse(err error) bool {
if gophercloud.ResponseCodeIs(err, http.StatusConflict) {
return true
}
return false
return gophercloud.ResponseCodeIs(err, http.StatusConflict)
}
// waitForStatusActive uses gopherclouds WaitFor() func to determine when the server becomes "ACTIVE".

View File

@ -131,10 +131,7 @@ func (tf *TemplateFunctions) AddTo(dest template.FuncMap, secretStore fi.SecretS
}
dest["GossipEnabled"] = func() bool {
if cluster.UsesLegacyGossip() {
return true
}
return false
return cluster.UsesLegacyGossip()
}
dest["PublishesDNSRecords"] = func() bool {
return cluster.PublishesDNSRecords()