+
+func (c *ChartMgr) DownloadChart(chartName string, version string) (io.ReadCloser, error) {
+ ricdms.Logger.Debug("Download Charts invoked")
+
+ if chartName == "" || version == "" {
+ return nil, fmt.Errorf("chartname or version is empty")
+ }
+
+ ChartURL := fmt.Sprintf(ricdms.Config.DownloadChartURLFormat, chartName, version)
+
+ resp, err := http.Get(ChartURL)
+ if err != nil {
+ return nil, err
+ }
+
+ return resp.Request.Body, nil
+}