func (r *Repo) List() ([]string, error) {
	var names []string
	for name := range r.entries {
		names = append(names, name)
	}
	return names, nil
}
List lists all chart names in a repo
package local
import (
	"fmt"
	"io/ioutil"
	"os"
	"path"
	"path/filepath"
	"regexp"
	"sort"
	"github.com/juju/errors"
	"github.com/bitnami-labs/charts-syncer/internal/utils"
	"github.com/bitnami-labs/charts-syncer/pkg/client/types"
	"helm.sh/helm/v3/pkg/chart"
)
var (
	versionRe = regexp.MustCompile("(.*)-(\\d+\\.\\d+\\.\\d+)\\.tgz")
)
type Repo struct {
	dir     string
	entries map[string][]string
}
func New(dir string) (*Repo, error) {
	d, err := filepath.Abs(dir)
	if err != nil {
		return nil, errors.Trace(err)
	}
	if err := os.MkdirAll(d, 0755); err != nil {
		return nil, errors.Trace(err)
	}
	entries := make(map[string][]string)
	matches, err := filepath.Glob(filepath.Join(d, "*.tgz"))
	if err != nil {
		return nil, errors.Trace(err)
	}
	for _, m := range matches {
		filename := filepath.Base(m)
		s := versionRe.FindStringSubmatch(filename)
		entries[s[1]] = append(entries[s[1]], s[2])
		sort.Strings(entries[s[0]])
	}
	return &Repo{dir: d, entries: entries}, nil
}