From 43c4378444995b45b1b6d5a8c6024e7cc652096f Mon Sep 17 00:00:00 2001 From: SataQiu Date: Fri, 12 Apr 2019 16:34:17 +0800 Subject: [PATCH] cleanup: using const block Signed-off-by: SataQiu --- cmd/helm/installer/options.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cmd/helm/installer/options.go b/cmd/helm/installer/options.go index 186286ec2..00cadac07 100644 --- a/cmd/helm/installer/options.go +++ b/cmd/helm/installer/options.go @@ -24,7 +24,12 @@ import ( "k8s.io/helm/pkg/version" ) -const defaultImage = "gcr.io/kubernetes-helm/tiller" +const ( + defaultImage = "gcr.io/kubernetes-helm/tiller" + + fmtJSON OutputFormat = "json" + fmtYAML OutputFormat = "yaml" +) // Options control how to install Tiller into a cluster, upgrade, and uninstall Tiller from a cluster. type Options struct { @@ -154,11 +159,6 @@ func (f *OutputFormat) Type() string { return "OutputFormat" } -const ( - fmtJSON OutputFormat = "json" - fmtYAML OutputFormat = "yaml" -) - // Set validates and sets the value of the OutputFormat func (f *OutputFormat) Set(s string) error { for _, of := range []OutputFormat{fmtJSON, fmtYAML} {