From 2df5ee827ba24b77bba77a21d27acf1fa597d81e Mon Sep 17 00:00:00 2001 From: Noah Stride Date: Fri, 3 Jan 2025 08:36:20 +0000 Subject: [PATCH] Fix interface nilness issue --- tool/tctl/common/bots_command.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tool/tctl/common/bots_command.go b/tool/tctl/common/bots_command.go index dbe22821c83b3..457739f4688a0 100644 --- a/tool/tctl/common/bots_command.go +++ b/tool/tctl/common/bots_command.go @@ -853,9 +853,9 @@ func formatBotInstanceAuthentication(record *machineidv1pb.BotInstanceStatusAuth table.AddRow([]string{"Authenticated At:", record.AuthenticatedAt.AsTime().Format(time.RFC3339)}) table.AddRow([]string{"Join Method:", cmp.Or(record.GetJoinAttrs().GetMeta().GetJoinMethod(), record.JoinMethod)}) table.AddRow([]string{"Join Token:", cmp.Or(record.GetJoinAttrs().GetMeta().GetJoinTokenName(), record.JoinToken)}) - var meta fmt.Stringer = record.GetJoinAttrs() - if meta == nil { - meta = record.Metadata + var meta fmt.Stringer = record.Metadata + if attrs := record.GetJoinAttrs(); attrs != nil { + meta = attrs } table.AddRow([]string{"Join Metadata:", meta.String()}) table.AddRow([]string{"Generation:", fmt.Sprint(record.Generation)})