Skip to content

Commit

Permalink
Fix interface nilness issue
Browse files Browse the repository at this point in the history
  • Loading branch information
strideynet committed Jan 3, 2025
1 parent d9aadb0 commit 2df5ee8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tool/tctl/common/bots_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)})
Expand Down

0 comments on commit 2df5ee8

Please sign in to comment.