mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-12-05 08:30:26 +08:00
优化代码
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user