mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 23:15:14 +00:00
fix the optimization of apiversion
This commit is contained in:
parent
86b4e777e1
commit
742b508d9d
@ -59,10 +59,9 @@ func RunApiVersions(f *cmdutil.Factory, w io.Writer) error {
|
|||||||
|
|
||||||
var expAPIVersions *api.APIVersions
|
var expAPIVersions *api.APIVersions
|
||||||
expAPIVersions, err = client.Experimental().ServerAPIVersions()
|
expAPIVersions, err = client.Experimental().ServerAPIVersions()
|
||||||
showExpVersions := (err == nil)
|
|
||||||
|
|
||||||
fmt.Fprintf(w, "Available Server Api Versions: %#v\n", *apiVersions)
|
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)
|
fmt.Fprintf(w, "Available Server Experimental Api Versions: %#v\n", *expAPIVersions)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user