code: func NewChartRepository(cfg *Entry, getters getter.Providers) (*ChartRepository, error) {
  	u, err := url.Parse(cfg.URL)
  	if err != nil {
  		return nil, fmt.Errorf("invalid chart URL format: %s", cfg.URL)
  	}
  
  	getterConstructor, err := getters.ByScheme(u.Scheme)
  	if err != nil {
  		return nil, fmt.Errorf("Could not find protocol handler for: %s", u.Scheme)
  	}
  	client, err := getterConstructor(cfg.URL, cfg.CertFile, cfg.KeyFile, cfg.CAFile)
  	if err != nil {
  		return nil, fmt.Errorf("Could not construct protocol handler for: %s error: %v", u.Scheme, err)
  	}
  
  	return &ChartRepository{
  		Config:    cfg,
  		IndexFile: NewIndexFile(),
  		Client:    client,
  	}, nil
  }
docs: // NewChartRepository constructs ChartRepository