优化代码

This commit is contained in:
刘祥超
2022-03-22 21:45:07 +08:00
parent 314362c24d
commit 30bfbdc01e
148 changed files with 340 additions and 315 deletions

View File

@@ -263,7 +263,7 @@ func (this *NodeClusterDAO) FindAllAPINodeAddrsWithCluster(tx *dbs.Tx, clusterId
return nil, err
}
for _, apiNode := range apiNodes {
if apiNode.IsOn != 1 {
if !apiNode.IsOn {
continue
}
addrs, err := apiNode.DecodeAccessAddrStrings()
@@ -288,7 +288,7 @@ func (this *NodeClusterDAO) FindAllAPINodeAddrsWithCluster(tx *dbs.Tx, clusterId
if err != nil {
return nil, err
}
if apiNode == nil || apiNode.IsOn != 1 {
if apiNode == nil || !apiNode.IsOn {
continue
}
addrs, err := apiNode.DecodeAccessAddrStrings()