replace else/if by else if

This commit is contained in:
iTrooz 2024-06-20 14:33:51 +02:00
parent 9ffcf6921c
commit c219e6dfa1
No known key found for this signature in database
GPG key ID: 8B83F77667B1BC6A

View file

@ -323,14 +323,10 @@ func (u *UpgradeService) UserExcludeUpgrades(graph *topo.Graph[string, *dep.Inst
u.log.Debugln("pruning", up.Name)
excluded = append(excluded, graph.Prune(up.Name)...)
}
} else {
// If the user explicitely wants to include a package/repository, exclude everything else
if !include.Get(upgradeId) && !otherInclude.Contains(up.Repository) {
u.log.Debugln("pruning", up.Name)
excluded = append(excluded, graph.Prune(up.Name)...)
}
} else if !include.Get(upgradeId) && !otherInclude.Contains(up.Repository) { // If the user explicitely wants to include a package/repository, exclude everything else
u.log.Debugln("pruning", up.Name)
excluded = append(excluded, graph.Prune(up.Name)...)
}
}
return excluded, nil