Skip to content

Commit

Permalink
More comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Jefftree committed May 24, 2023
1 parent d8c7cd0 commit b5722cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/cached/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,15 +184,15 @@ func NewListMerger[T, V any](mergeFn func(results []Result[T]) Result[V], caches
}
}
func (c *listMerger[T, V]) prepareResults() []Result[T] {
cacheResults := []Result[T]{}
cacheResults := make([]Result[T], 0, len(c.caches))
for _, cache := range c.caches {
cacheResults = append(cacheResults, cache.Get())
}
return cacheResults
}

func (c *listMerger[T, V]) needsRunning(results []Result[T]) bool {
if len(c.cacheResults) == 0 {
if c.cacheResults == nil {
return true
}
if c.result.Err != nil {
Expand Down

0 comments on commit b5722cd

Please sign in to comment.