repo-updater: Refactor Store scanning and pagination
Created by: tsenart
In preparation for extending Store
with ListSources
and
UpsertSources
, which is required for upcoming migrations, this
commit refactors internal methods of pagination and scanning to leverage
closure side effects for polymorphism.
This is a more type-safe approach than refactoring to use *[]interface{}
instead of *[]*Repo
.
Part of #2025 (closed)