vmware / govmomi

Go library for the VMware vSphere API
Apache License 2.0
2.27k stars 897 forks source link

govc: snapshot.tree json output to stdout #3393

Closed jlehtnie closed 3 months ago

jlehtnie commented 3 months ago

golang builtin println is meant for debugging only and prints always to stderr

Description

Print json to stdout instead of stderr.

Closes: https://github.com/vmware/govmomi/issues/3392

Type of change

Please mark options that are relevant:

How Has This Been Tested?

Run command: govc snapshot.tree -json -vm $vm 2> /dev/null

Obverve json appearing in the terminal.

Checklist:

vmwclabot commented 3 months ago

@jlehtnie, you must sign our contributor license agreement before your changes are merged. Click here to sign the agreement. If you are a VMware employee, read this for further instruction.

vmwclabot commented 3 months ago

@jlehtnie, we have received your signed contributor license agreement. The review is usually completed within a week, but may take longer under certain circumstances. Another comment will be added to the pull request to notify you when the merge can proceed.

vmwclabot commented 2 months ago

@jlehtnie, VMware has approved your signed contributor license agreement.