Skip to content

Commit

Permalink
govc: snapshot.tree json output to stdout
Browse files Browse the repository at this point in the history
golang builtin println is meant for debugging only and prints
always to stderr
  • Loading branch information
juleh3 authored and dougm committed Mar 27, 2024
1 parent 9c5fca6 commit cd9ce0a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion govc/vm/snapshot/tree.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit cd9ce0a

Please sign in to comment.