From 46a1edcb3b7ba9d468e561fe312a8f23b9ffb2c4 Mon Sep 17 00:00:00 2001 From: Todd Date: Fri, 12 Nov 2021 16:51:28 -0700 Subject: [PATCH] Add DNS Names and IP Addresses to the CLI output. (#1701) --- internal/cmd/commands/hostscmd/funcs.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/internal/cmd/commands/hostscmd/funcs.go b/internal/cmd/commands/hostscmd/funcs.go index 95c61b5cba..f7fdfb7490 100644 --- a/internal/cmd/commands/hostscmd/funcs.go +++ b/internal/cmd/commands/hostscmd/funcs.go @@ -168,6 +168,22 @@ func printItemTable(result api.GenericResult) string { ) } + if len(item.IpAddresses) > 0 { + ret = append(ret, + "", + " IP Addresses:", + base.WrapSlice(4, item.IpAddresses), + ) + } + + if len(item.DnsNames) > 0 { + ret = append(ret, + "", + " DNS Names:", + base.WrapSlice(4, item.DnsNames), + ) + } + if len(item.Attributes) > 0 { ret = append(ret, "",