Skip to content

Commit

Permalink
Apply minimal indentation principle
Browse files Browse the repository at this point in the history
  • Loading branch information
fweikert committed Nov 25, 2024
1 parent 58eb135 commit 7f06f2a
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions repositories/gcs.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,15 +159,13 @@ func (gcs *GCSRepo) matchingVersions(history []string, opts *core.FilterOpts) ([
versions := getVersionsFromGCSPrefixes(prefixes)
for vpos := len(versions) - 1; vpos >= 0; vpos-- {
curr := versions[vpos]
if strings.Contains(curr, "rolling") {
if strings.Contains(curr, "rolling") || !opts.Filter(curr) {
continue
}

if opts.Filter(curr) {
descendingMatches = append(descendingMatches, curr)
if len(descendingMatches) == opts.MaxResults {
return descendingMatches, nil
}
descendingMatches = append(descendingMatches, curr)
if len(descendingMatches) == opts.MaxResults {
return descendingMatches, nil
}
}
}
Expand Down

0 comments on commit 7f06f2a

Please sign in to comment.