diff --git a/cmd/helm/create.go b/cmd/helm/create.go index 1300b68aaaa13838278f05c5694de5527510a0c3..c99353dc2d57b92af85574242ad80eca8a41d9c5 100644 --- a/cmd/helm/create.go +++ b/cmd/helm/create.go @@ -62,9 +62,7 @@ type createCmd struct { } func newCreateCmd(out io.Writer) *cobra.Command { - cc := &createCmd{ - out: out, - } + cc := &createCmd{out: out} cmd := &cobra.Command{ Use: "create NAME", diff --git a/cmd/helm/dependency.go b/cmd/helm/dependency.go index 1370adfb07f5e53ec7d3667b86525e9e2ba46bd0..a61f1673ad046cd351c9306fc0dc17126e964526 100644 --- a/cmd/helm/dependency.go +++ b/cmd/helm/dependency.go @@ -108,9 +108,8 @@ type dependencyListCmd struct { } func newDependencyListCmd(out io.Writer) *cobra.Command { - dlc := &dependencyListCmd{ - out: out, - } + dlc := &dependencyListCmd{out: out} + cmd := &cobra.Command{ Use: "list [flags] CHART", Aliases: []string{"ls"}, diff --git a/cmd/helm/dependency_build.go b/cmd/helm/dependency_build.go index 1168a2ed272f8efc2983ddda884d7a775921862a..ec5fd14b75d91446fc15c14b666f873b7b18f225 100644 --- a/cmd/helm/dependency_build.go +++ b/cmd/helm/dependency_build.go @@ -45,9 +45,7 @@ type dependencyBuildCmd struct { } func newDependencyBuildCmd(out io.Writer) *cobra.Command { - dbc := &dependencyBuildCmd{ - out: out, - } + dbc := &dependencyBuildCmd{out: out} cmd := &cobra.Command{ Use: "build [flags] CHART", diff --git a/cmd/helm/dependency_update.go b/cmd/helm/dependency_update.go index 188f21e8832940e2ec6d8f255e0bed0f7585da46..735f205aeeea9eab050bdac63089f3fa4d84f652 100644 --- a/cmd/helm/dependency_update.go +++ b/cmd/helm/dependency_update.go @@ -52,9 +52,7 @@ type dependencyUpdateCmd struct { // newDependencyUpdateCmd creates a new dependency update command. func newDependencyUpdateCmd(out io.Writer) *cobra.Command { - duc := &dependencyUpdateCmd{ - out: out, - } + duc := &dependencyUpdateCmd{out: out} cmd := &cobra.Command{ Use: "update [flags] CHART", diff --git a/cmd/helm/init.go b/cmd/helm/init.go index af7fc5b20c73100f677012705b227515af978b6a..868a5bf0d4419c2155c076a1a2014254e5a808d8 100644 --- a/cmd/helm/init.go +++ b/cmd/helm/init.go @@ -82,9 +82,7 @@ type initCmd struct { } func newInitCmd(out io.Writer) *cobra.Command { - i := &initCmd{ - out: out, - } + i := &initCmd{out: out} cmd := &cobra.Command{ Use: "init", diff --git a/cmd/helm/package.go b/cmd/helm/package.go index c1ad20894c6cd350eb6897a38836e5bd7b211fcf..44c34a3159ba9c2ca60f042c4cbc2886999be78c 100644 --- a/cmd/helm/package.go +++ b/cmd/helm/package.go @@ -64,9 +64,7 @@ type packageCmd struct { } func newPackageCmd(out io.Writer) *cobra.Command { - pkg := &packageCmd{ - out: out, - } + pkg := &packageCmd{out: out} cmd := &cobra.Command{ Use: "package [flags] [CHART_PATH] [...]", diff --git a/cmd/helm/repo_add.go b/cmd/helm/repo_add.go index 1bdbfddb17c0d318c19199fc2009030fd975283d..b172d016cadab8b042ca347885ff46430704f895 100644 --- a/cmd/helm/repo_add.go +++ b/cmd/helm/repo_add.go @@ -41,9 +41,7 @@ type repoAddCmd struct { } func newRepoAddCmd(out io.Writer) *cobra.Command { - add := &repoAddCmd{ - out: out, - } + add := &repoAddCmd{out: out} cmd := &cobra.Command{ Use: "add [flags] [NAME] [URL]", diff --git a/cmd/helm/repo_index.go b/cmd/helm/repo_index.go index ad5808946536902b3f7314209586e87907a7a327..95e4b8aac8a588a11a97ac15f0644dcc1d9f9f10 100644 --- a/cmd/helm/repo_index.go +++ b/cmd/helm/repo_index.go @@ -45,9 +45,7 @@ type repoIndexCmd struct { } func newRepoIndexCmd(out io.Writer) *cobra.Command { - index := &repoIndexCmd{ - out: out, - } + index := &repoIndexCmd{out: out} cmd := &cobra.Command{ Use: "index [flags] [DIR]", diff --git a/cmd/helm/repo_list.go b/cmd/helm/repo_list.go index f4a1af948316a074eea0db261fe7894d2e731fe8..0f795b2b0fb3bf93cdfeaf3e8fd7ac1444763b5e 100644 --- a/cmd/helm/repo_list.go +++ b/cmd/helm/repo_list.go @@ -34,9 +34,7 @@ type repoListCmd struct { } func newRepoListCmd(out io.Writer) *cobra.Command { - list := &repoListCmd{ - out: out, - } + list := &repoListCmd{out: out} cmd := &cobra.Command{ Use: "list [flags]", diff --git a/cmd/helm/repo_remove.go b/cmd/helm/repo_remove.go index b72930b551002386dd0faf7eeb26291acefb2809..201ee9ca80e2604735e3e1969b6cace7551ce2e2 100644 --- a/cmd/helm/repo_remove.go +++ b/cmd/helm/repo_remove.go @@ -34,9 +34,7 @@ type repoRemoveCmd struct { } func newRepoRemoveCmd(out io.Writer) *cobra.Command { - remove := &repoRemoveCmd{ - out: out, - } + remove := &repoRemoveCmd{out: out} cmd := &cobra.Command{ Use: "remove [flags] [NAME]", diff --git a/cmd/helm/repo_update.go b/cmd/helm/repo_update.go index 5e710a26738758bb6f7fff82bb610ec262e89ec4..51e5c08685a2c140b2b72c236b0687d917abdc98 100644 --- a/cmd/helm/repo_update.go +++ b/cmd/helm/repo_update.go @@ -37,9 +37,7 @@ Information is cached locally, where it is used by commands like 'helm search'. future releases. ` -var ( - errNoRepositories = errors.New("no repositories found. You must add one before updating") -) +var errNoRepositories = errors.New("no repositories found. You must add one before updating") type repoUpdateCmd struct { update func([]*repo.ChartRepository, io.Writer, helmpath.Home) diff --git a/cmd/helm/search.go b/cmd/helm/search.go index 4e7bbb2b3e0fad2cd717eec3dbefc9a34e59bfe6..9f1398de37d3b883f7b4650c2a82bfd240fbc838 100644 --- a/cmd/helm/search.go +++ b/cmd/helm/search.go @@ -50,13 +50,14 @@ type searchCmd struct { } func newSearchCmd(out io.Writer) *cobra.Command { - sc := &searchCmd{out: out, helmhome: settings.Home} + sc := &searchCmd{out: out} cmd := &cobra.Command{ Use: "search [keyword]", Short: "search for a keyword in charts", Long: searchDesc, RunE: func(cmd *cobra.Command, args []string) error { + sc.helmhome = settings.Home return sc.run(args) }, }