do not show repo if no tag exist

This commit is contained in:
p.fomin 2019-03-07 19:34:03 +07:00
parent 5bce4ad9c6
commit 99a5773719

View File

@ -183,7 +183,9 @@ func (c *Client) Repositories(useCache bool) map[string][]string {
namespace = f[0]
repo = f[1]
}
c.repos[namespace] = append(c.repos[namespace], repo)
if len(c.Tags(r.String())) > 0 {
c.repos[namespace] = append(c.repos[namespace], repo)
}
}
// pagination
@ -249,7 +251,9 @@ func (c *Client) CountTags(interval uint8) {
if n != "library" {
repoPath = fmt.Sprintf("%s/%s", n, r)
}
c.tagCounts[fmt.Sprintf("%s/%s", n, r)] = len(c.Tags(repoPath))
if len(c.Tags(repoPath)) > 0 {
c.tagCounts[fmt.Sprintf("%s/%s", n, r)] = len(c.Tags(repoPath))
}
}
}
c.logger.Info("Tags calculation complete.")