From 494ca766f954d29abcb048560d5f594b8f23b401 Mon Sep 17 00:00:00 2001 From: "abejidefemi1@gmail.com" Date: Wed, 2 Oct 2019 00:02:30 +0100 Subject: [PATCH] refactor manager file in pkg folder Signed-off-by: abejidefemi1@gmail.com --- pkg/downloader/manager.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg/downloader/manager.go b/pkg/downloader/manager.go index 6c6886e8a..23a5b587e 100644 --- a/pkg/downloader/manager.go +++ b/pkg/downloader/manager.go @@ -442,8 +442,7 @@ func (m *Manager) UpdateRepositories() error { if err != nil { return err } - repos := rf.Repositories - if len(repos) > 0 { + if repos := rf.Repositories; len(repos) > 0 { // This prints warnings straight to out. if err := m.parallelRepoUpdate(repos); err != nil { return err @@ -616,7 +615,7 @@ func writeLock(chartpath string, lock *chartutil.RequirementsLock) error { } // tarFromLocalDir archive a dep chart from local directory and save it into charts/ -func tarFromLocalDir(chartpath string, name string, repo string, version string) (string, error) { +func tarFromLocalDir(chartpath, name, repo, version string) (string, error) { destPath := filepath.Join(chartpath, "charts") if !strings.HasPrefix(repo, "file://") {