mirror of
https://github.com/hauler-dev/hauler.git
synced 2026-08-24 11:47:20 +00:00
Merge pull request #85 from rancherfederal/fix-list-paging
Fix list request to registry to properly page
This commit is contained in:
+3
-2
@@ -7,7 +7,6 @@ import (
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"regexp"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"github.com/distribution/distribution/v3/configuration"
|
||||
@@ -93,7 +92,9 @@ func (s *Store) List(ctx context.Context) ([]string, error) {
|
||||
for {
|
||||
chunk := make([]string, 20) // randomly chosen number...
|
||||
nf, err := reg.Repositories(ctx, chunk, last)
|
||||
last = strconv.Itoa(nf)
|
||||
if nf > 0 {
|
||||
last = chunk[nf-1]
|
||||
}
|
||||
|
||||
for _, e := range chunk {
|
||||
if e == "" {
|
||||
|
||||
Reference in New Issue
Block a user