From b6e3cd81c6dc318c8b1bfef05d386d98a2f73638 Mon Sep 17 00:00:00 2001 From: Juan Font Alonso Date: Fri, 19 Aug 2022 14:27:40 +0200 Subject: [PATCH] Fixed minor linting things --- protocol_common.go | 4 ---- protocol_legacy.go | 1 - 2 files changed, 5 deletions(-) diff --git a/protocol_common.go b/protocol_common.go index 998b2026..49c9138a 100644 --- a/protocol_common.go +++ b/protocol_common.go @@ -100,11 +100,9 @@ func (h *Headscale) handleRegisterCommon( registerRequest tailcfg.RegisterRequest, machineKey key.MachinePublic, ) { - now := time.Now().UTC() machine, err := h.GetMachineByAnyNodeKey(registerRequest.NodeKey, registerRequest.OldNodeKey) if errors.Is(err, gorm.ErrRecordNotFound) { - // If the machine has AuthKey set, handle registration via PreAuthKeys if registerRequest.Auth.AuthKey != "" { h.handleAuthKeyCommon(writer, req, registerRequest, machineKey) @@ -242,7 +240,6 @@ func (h *Headscale) handleRegisterCommon( return } - } // handleAuthKeyCommon contains the logic to manage auth key client registration @@ -676,7 +673,6 @@ func (h *Headscale) handleMachineRefreshKeyCommon( Str("old_node_key", registerRequest.OldNodeKey.ShortString()). Str("machine", machine.Hostname). Msg("Machine successfully refreshed") - } func (h *Headscale) handleMachineExpiredCommon( diff --git a/protocol_legacy.go b/protocol_legacy.go index b943dc9f..4e75d127 100644 --- a/protocol_legacy.go +++ b/protocol_legacy.go @@ -55,5 +55,4 @@ func (h *Headscale) RegistrationHandler( } h.handleRegisterCommon(writer, req, registerRequest, machineKey) - }