Skip to content

Commit

Permalink
govc: host.info: use writer instead of os.stdout
Browse files Browse the repository at this point in the history
Closes: vmware#2995
  • Loading branch information
markrexwinkel authored and Priyanka Jiandani committed Jan 17, 2024
1 parent 5f29d96 commit 02918ba
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions govc/host/info.go
Expand Up @@ -21,7 +21,6 @@ import (
"flag"
"fmt"
"io"
"os"
"text/tabwriter"

"github.com/vmware/govmomi/govc/cli"
Expand Down Expand Up @@ -132,7 +131,7 @@ func (r *infoResult) Write(w io.Writer) error {
objects[o.Reference()] = o
}

tw := tabwriter.NewWriter(os.Stdout, 2, 0, 2, ' ', 0)
tw := tabwriter.NewWriter(w, 2, 0, 2, ' ', 0)

for _, o := range r.objects {
host := objects[o.Reference()]
Expand Down

0 comments on commit 02918ba

Please sign in to comment.