| 447 | } |
| 448 | |
| 449 | func updateCharts(repos []*repo.ChartRepository) { |
| 450 | fmt.Printf("Hang tight while we grab the latest from your chart repositories...") |
| 451 | var wg sync.WaitGroup |
| 452 | for _, re := range repos { |
| 453 | wg.Add(1) |
| 454 | go func(re *repo.ChartRepository) { |
| 455 | defer wg.Done() |
| 456 | if _, err := re.DownloadIndexFile(); err != nil { |
| 457 | fmt.Printf("...Unable to get an update from the %q chart repository (%s):\n\t%s\n", re.Config.Name, re.Config.URL, err) |
| 458 | } else { |
| 459 | fmt.Printf("...Successfully got an update from the %q chart repository\n", re.Config.Name) |
| 460 | } |
| 461 | }(re) |
| 462 | } |
| 463 | wg.Wait() |
| 464 | fmt.Printf("Update Complete. ⎈ Happy Helming!⎈ ") |
| 465 | } |