Merge pull request #106152 from tklauser/kubectl-version-unnecessary-sprintf

kubectl: remove unnecessary `fmt.Sprintf`
This commit is contained in:
Kubernetes Prow Robot 2022-01-07 08:58:33 -08:00 committed by GitHub
commit abdcd21902
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -135,9 +135,9 @@ func (o *Options) Run() error {
fmt.Fprintf(o.Out, "Server Version: %s\n", serverVersion.GitVersion)
}
} else {
fmt.Fprintf(o.Out, "Client Version: %s\n", fmt.Sprintf("%#v", clientVersion))
fmt.Fprintf(o.Out, "Client Version: %#v\n", clientVersion)
if serverVersion != nil {
fmt.Fprintf(o.Out, "Server Version: %s\n", fmt.Sprintf("%#v", *serverVersion))
fmt.Fprintf(o.Out, "Server Version: %#v\n", *serverVersion)
}
}
case "yaml":