fix: remove ineffectual assignments
- Fix loop variable reassignment in config_handlers.go - Remove redundant boolean assignments in swarm.go
This commit is contained in:
parent
60cd019d33
commit
16603e8b4a
2 changed files with 2 additions and 8 deletions
|
|
@ -805,10 +805,10 @@ func (h *ConfigHandlers) GetAllNodesForAPI() []NodeResponse {
|
||||||
containerSSHBlocked := isContainerSSHRestricted()
|
containerSSHBlocked := isContainerSSHRestricted()
|
||||||
|
|
||||||
// Add PVE nodes
|
// Add PVE nodes
|
||||||
for i, pve := range h.config.PVEInstances {
|
for i := range h.config.PVEInstances {
|
||||||
// Refresh cluster metadata if we previously failed to detect endpoints
|
// Refresh cluster metadata if we previously failed to detect endpoints
|
||||||
h.maybeRefreshClusterInfo(&h.config.PVEInstances[i])
|
h.maybeRefreshClusterInfo(&h.config.PVEInstances[i])
|
||||||
pve = h.config.PVEInstances[i]
|
pve := h.config.PVEInstances[i]
|
||||||
node := NodeResponse{
|
node := NodeResponse{
|
||||||
ID: generateNodeID("pve", i),
|
ID: generateNodeID("pve", i),
|
||||||
Type: "pve",
|
Type: "pve",
|
||||||
|
|
|
||||||
|
|
@ -82,12 +82,6 @@ func (a *Agent) collectSwarmData(ctx context.Context, info systemtypes.Info, con
|
||||||
includeTasks := a.cfg.IncludeTasks
|
includeTasks := a.cfg.IncludeTasks
|
||||||
|
|
||||||
if info.Swarm.LocalNodeState != swarmtypes.LocalNodeStateActive {
|
if info.Swarm.LocalNodeState != swarmtypes.LocalNodeStateActive {
|
||||||
if !includeServices {
|
|
||||||
includeServices = false
|
|
||||||
}
|
|
||||||
if !includeTasks {
|
|
||||||
includeTasks = false
|
|
||||||
}
|
|
||||||
return nil, nil, swarmInfo
|
return nil, nil, swarmInfo
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue