Skip to content

Commit

Permalink
Merge branch 'master' of github.com:Quiq/docker-registry-ui
Browse files Browse the repository at this point in the history
  • Loading branch information
roman-vynar committed Apr 6, 2022
2 parents a1bef24 + 905e8f7 commit 31b16bb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions registry/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,11 @@ func (c *Client) Repositories(useCache bool) map[string][]string {
linkRegexp := regexp.MustCompile("^<(.*?)>;.*$")
scope := "registry:catalog:*"
uri := "/v2/_catalog"
c.repos = map[string][]string{}
tmp := map[string][]string{}
for {
data, resp := c.callRegistry(uri, scope, "manifest.v2")
if data == "" {
c.repos = tmp
return c.repos
}

Expand All @@ -194,7 +195,7 @@ func (c *Client) Repositories(useCache bool) map[string][]string {
namespace = f[0]
repo = f[1]
}
c.repos[namespace] = append(c.repos[namespace], repo)
tmp[namespace] = append(tmp[namespace], repo)
}

// pagination
Expand All @@ -208,6 +209,7 @@ func (c *Client) Repositories(useCache bool) map[string][]string {
break
}
}
c.repos = tmp
return c.repos
}

Expand Down

0 comments on commit 31b16bb

Please sign in to comment.