From c4e6ad1ec788fab5fee7f4b3bc6355154f0a154e Mon Sep 17 00:00:00 2001 From: Juan Font Date: Fri, 10 Sep 2021 00:52:08 +0200 Subject: [PATCH] Fixed some typos --- cmd/headscale/cli/nodes.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cmd/headscale/cli/nodes.go b/cmd/headscale/cli/nodes.go index 98dea9aa..5f30dc1b 100644 --- a/cmd/headscale/cli/nodes.go +++ b/cmd/headscale/cli/nodes.go @@ -228,7 +228,7 @@ func nodesToPtables(currentNamespace headscale.Namespace, machines []headscale.M var lastSeen time.Time var lastSeenTime string if machine.LastSeen != nil { - lastSeen = *m.LastSeen + lastSeen = *machine.LastSeen lastSeenTime = lastSeen.Format("2006-01-02 15:04:05") } nKey, err := wgkey.ParseHex(machine.NodeKey) @@ -239,8 +239,7 @@ func nodesToPtables(currentNamespace headscale.Namespace, machines []headscale.M var online string if lastSeen.After(time.Now().Add(-5 * time.Minute)) { // TODO: Find a better way to reliably show if online - online = pter - LightGreen("true") + online = pterm.LightGreen("true") } else { online = pterm.LightRed("false") }