From 5cbd4513a436592f6971a2a4c78b6fe332e067b5 Mon Sep 17 00:00:00 2001 From: Kristoffer Dalby Date: Mon, 22 Nov 2021 17:21:56 +0000 Subject: [PATCH] Simplify register function if --- machine.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/machine.go b/machine.go index e34bff8..d6903bd 100644 --- a/machine.go +++ b/machine.go @@ -61,7 +61,7 @@ type ( ) // For the time being this method is rather naive. -func (machine Machine) isAlreadyRegistered() bool { +func (machine Machine) isRegistered() bool { return machine.Registered } @@ -612,7 +612,7 @@ func (h *Headscale) RegisterMachine( Str("machine", machine.Name). Msg("Attempting to register machine") - if machine.isAlreadyRegistered() { + if machine.isRegistered() { err := errMachineAlreadyRegistered log.Error(). Caller().