func (hub *Client) tagFetchWorker(id int, workCh <-chan string, resultCh chan<- repoTagList) {
	for repo := range workCh {
		log.Debugf("%d: looking up tags for %s...", id, repo)
		tags, err := hub.Tags(repo)
		if err != nil {
			log.Warnw("error fetching tags", "repo", repo, "error", err)
			continue
		}
		resultCh <- repoTagList{
			Repo: repo,
			Tags: tags,
		}
	}
	log.Debugf("%d: tag fetcher exiting", id)
}
given a channel of repos, go get the tags for each one
package client
import (
	"fmt"
	"sync"
	r "github.com/nokia/docker-registry-client/registry"
	"github.com/tumblr/docker-registry-pruner/pkg/config"
	"github.com/tumblr/docker-registry-pruner/pkg/registry"
	"go.uber.org/zap"
)
var (
	logger, _ = zap.NewProduction()
	log       = logger.Sugar()
)
type Client struct {
	r.Registry
	Config *config.Config
}
type repoTagList struct {
	Repo string
	Tags []string
}
type repoTag struct {
	Repo string
	Tag  string
}
func LogCallback(format string, args ...interface{}) {
	log.Debugf(format, args...)
}
func New(c *config.Config) (*Client, error) {
	opts := r.Options{
		Username:      c.Username,
		Password:      c.Password,
		Insecure:      false,
		Logf:          LogCallback,
		DoInitialPing: true,
	}
	hub, err := r.NewCustom(c.RegistryURL, opts)
	if err != nil {
		return nil, err
	}
	if err := c.Validate(); err != nil {
		return nil, err
	}
	client := Client{
		Registry: *hub,
		Config:   c,
	}
	return &client, nil
}