diff --git a/cmd/helm/status.go b/cmd/helm/status.go index c237d2a84..95c25b735 100644 --- a/cmd/helm/status.go +++ b/cmd/helm/status.go @@ -17,21 +17,22 @@ limitations under the License. package main import ( + "bytes" "fmt" "io" "log" "strings" "time" - "bytes" "github.com/spf13/cobra" + "k8s.io/kubectl/pkg/cmd/get" + "helm.sh/helm/v3/cmd/helm/require" "helm.sh/helm/v3/pkg/action" "helm.sh/helm/v3/pkg/chartutil" "helm.sh/helm/v3/pkg/cli/output" "helm.sh/helm/v3/pkg/release" - "k8s.io/kubectl/pkg/cmd/get" ) // NOTE: Keep the list of statuses up-to-date with pkg/release/status.go. @@ -149,7 +150,7 @@ func (s statusPrinter) WriteTable(out io.Writer) error { fmt.Fprintf(buf, "failed to print object type %s: %v\n", t, err) } } - + buf.WriteString("\n") } diff --git a/cmd/helm/status_test.go b/cmd/helm/status_test.go index 7a7afbc6d..f6067497e 100644 --- a/cmd/helm/status_test.go +++ b/cmd/helm/status_test.go @@ -20,10 +20,11 @@ import ( "testing" "time" + "k8s.io/apimachinery/pkg/runtime" + "helm.sh/helm/v3/pkg/chart" "helm.sh/helm/v3/pkg/release" helmtime "helm.sh/helm/v3/pkg/time" - "k8s.io/apimachinery/pkg/runtime" ) func TestStatusCmd(t *testing.T) { @@ -76,9 +77,9 @@ func TestStatusCmd(t *testing.T) { rels: releasesMockWithStatus( &release.Info{ Resources: map[string][]runtime.Object{ - "test": []runtime.Object{}, + "test": {}, }, - Status: release.StatusDeployed, + Status: release.StatusDeployed, }, ), }, { @@ -88,9 +89,9 @@ func TestStatusCmd(t *testing.T) { rels: releasesMockWithStatus( &release.Info{ Resources: map[string][]runtime.Object{ - "test": []runtime.Object{}, + "test": {}, }, - Status: release.StatusDeployed, + Status: release.StatusDeployed, }, ), }, { diff --git a/pkg/action/status.go b/pkg/action/status.go index afebb62c7..290610330 100644 --- a/pkg/action/status.go +++ b/pkg/action/status.go @@ -72,7 +72,7 @@ func (s *Status) Run(name string) (*release.Release, error) { } rel.Info.Resources = resp - + return rel, nil } return nil, err diff --git a/pkg/release/info.go b/pkg/release/info.go index 97ede2549..5d25d9497 100644 --- a/pkg/release/info.go +++ b/pkg/release/info.go @@ -15,9 +15,10 @@ limitations under the License. package release -import ( - "helm.sh/helm/v3/pkg/time" +import ( "k8s.io/apimachinery/pkg/runtime" + + "helm.sh/helm/v3/pkg/time" ) // Info describes release information.