diff --git a/cmd/helm/create.go b/cmd/helm/create.go index 1300b68aa..c99353dc2 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 1370adfb0..a61f1673a 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 1168a2ed2..ec5fd14b7 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 188f21e88..735f205ae 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 af7fc5b20..868a5bf0d 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 c1ad20894..44c34a315 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 1bdbfddb1..b172d016c 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 ad5808946..95e4b8aac 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 f4a1af948..0f795b2b0 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 b72930b55..201ee9ca8 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 5e710a267..51e5c0868 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 4e7bbb2b3..9f1398de3 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) }, }