Revert "fix: resolve most comments"
This reverts commit 6a5846b32e
.
Signed-off-by: James Hewitt <james.hewitt@uk.ibm.com>
This commit is contained in:
parent
97957b12b1
commit
8e4a8517c5
1 changed files with 5 additions and 6 deletions
|
@ -14,21 +14,20 @@ import (
|
|||
)
|
||||
|
||||
var (
|
||||
// ErrStopReposWalk is a sentinel error to indicate that the repository path walk was stopped.
|
||||
// ErrStopReposWalk is used as a return value to indicate that the repository path walk
|
||||
// should be stopped. It's not returned as an error by any function.
|
||||
ErrStopReposWalk = errors.New("stop repos walk")
|
||||
)
|
||||
|
||||
// Repositories populates the passed passed repos slice with repositories in the
|
||||
// registry up to the capacity of the slice. Returns the number of repos returned and
|
||||
// `io.EOF` if no more repositories are available.
|
||||
// Returns a list or a partial list of repositories in the registry.
|
||||
// Because it's a quite expensive operation, it should only be used when building up
|
||||
// an initial set of repositories.
|
||||
func (reg *registry) Repositories(ctx context.Context, repos []string, last string) (n int, err error) {
|
||||
var finishedWalk bool
|
||||
var foundRepos []string
|
||||
|
||||
if len(repos) == 0 && cap(repos) == 0 {
|
||||
return 0, errors.New("no repos requested")
|
||||
if len(repos) == 0 {
|
||||
return -1, errors.New("no repos requested")
|
||||
}
|
||||
|
||||
root, err := pathFor(repositoriesRootPathSpec{})
|
||||
|
|
Loading…
Reference in a new issue