Skip to content

Commit

Permalink
Review fix
Browse files Browse the repository at this point in the history
Signed-off-by: AbstractionFactory <[email protected]>
  • Loading branch information
abstractionfactory committed Feb 12, 2025
1 parent 6a35a2b commit 958d22d
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions backend/internal/providerindex/providertypes/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,21 +75,19 @@ func (p *Provider) Equals(other *Provider) bool {
if p == nil || other == nil {
return false
}
reverseAliasesEqual := true
if len(p.ReverseAliases) != len(other.ReverseAliases) {
reverseAliasesEqual = false
return false
} else {
for i := range len(p.ReverseAliases) {
if !p.ReverseAliases[i].Equals(other.ReverseAliases[i].Addr) {
reverseAliasesEqual = false
break
return false
}
}
}
return p.Addr.Equals(other.Addr.Addr) && slices.Equal(p.Warnings, other.Warnings) && p.Link == other.Link &&
(p.CanonicalAddr == other.CanonicalAddr || p.CanonicalAddr.Equals(other.CanonicalAddr.Addr)) &&
reverseAliasesEqual && p.Description == other.Description && p.Popularity == other.Popularity &&
p.ForkCount == other.ForkCount && p.ForkOfLink == other.ForkOfLink && p.ForkOf == other.ForkOf &&
p.Description == other.Description && p.Popularity == other.Popularity && p.ForkCount == other.ForkCount &&
p.ForkOfLink == other.ForkOfLink && p.ForkOf == other.ForkOf &&
p.UpstreamPopularity == other.UpstreamPopularity && p.UpstreamForkCount == other.UpstreamForkCount &&
slices.Equal(p.Versions, other.Versions) && p.BlockedReason == other.BlockedReason
}
Expand Down

0 comments on commit 958d22d

Please sign in to comment.