From 742b508d9d8dc694a8d293cd69f39e22ab381383 Mon Sep 17 00:00:00 2001 From: eulerzgy Date: Tue, 15 Sep 2015 01:16:10 +0800 Subject: [PATCH] fix the optimization of apiversion --- pkg/kubectl/cmd/apiversions.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/kubectl/cmd/apiversions.go b/pkg/kubectl/cmd/apiversions.go index 9694f0e4d7b..617142501a0 100644 --- a/pkg/kubectl/cmd/apiversions.go +++ b/pkg/kubectl/cmd/apiversions.go @@ -59,10 +59,9 @@ func RunApiVersions(f *cmdutil.Factory, w io.Writer) error { var expAPIVersions *api.APIVersions expAPIVersions, err = client.Experimental().ServerAPIVersions() - showExpVersions := (err == nil) fmt.Fprintf(w, "Available Server Api Versions: %#v\n", *apiVersions) - if showExpVersions { + if err == nil { fmt.Fprintf(w, "Available Server Experimental Api Versions: %#v\n", *expAPIVersions) }