mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 14:37:00 +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
|
||||
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)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user