From cd9ce0aeef13e51e734bb35058280ad69ac1c1c8 Mon Sep 17 00:00:00 2001 From: Jukka Lehtniemi Date: Thu, 21 Mar 2024 18:20:09 +0200 Subject: [PATCH] govc: snapshot.tree json output to stdout golang builtin println is meant for debugging only and prints always to stderr --- govc/vm/snapshot/tree.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/govc/vm/snapshot/tree.go b/govc/vm/snapshot/tree.go index 406f8f6d8..85f570acb 100644 --- a/govc/vm/snapshot/tree.go +++ b/govc/vm/snapshot/tree.go @@ -151,7 +151,7 @@ func (cmd *tree) writeJson(vm mo.VirtualMachine) { SnapshotRecords = append(SnapshotRecords, cmd.makeSnapshotRecord(vm, rootSnapshot, nil)) } b, _ := json.MarshalIndent(SnapshotRecords, "", " ") - println(string(b)) + fmt.Println(string(b)) } func (cmd *tree) write(level int, parent string, pref *types.ManagedObjectReference, st []types.VirtualMachineSnapshotTree) {