From fca33aacbe13ce54e3118eea599eef87fcb18abe Mon Sep 17 00:00:00 2001
From: Laurent Marchaud <laurent@marchaud.com>
Date: Fri, 19 Aug 2022 15:07:01 +0200
Subject: [PATCH] Fix rebased errors scope in machine.go

Signed-off-by: Laurent Marchaud <laurent@marchaud.com>
---
 machine.go | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/machine.go b/machine.go
index a877a5f..0f291de 100644
--- a/machine.go
+++ b/machine.go
@@ -24,9 +24,9 @@ const (
 	ErrMachineNotFoundRegistrationCache = Error(
 		"machine not found in registration cache",
 	)
-	errCouldNotConvertMachineInterface = Error("failed to convert machine interface")
-	errHostnameTooLong                 = Error("Hostname too long")
-	errDifferentRegisteredNamespace    = Error("machine was previously registered with a different namespace")
+	ErrCouldNotConvertMachineInterface = Error("failed to convert machine interface")
+	ErrHostnameTooLong                 = Error("Hostname too long")
+	ErrDifferentRegisteredNamespace    = Error("machine was previously registered with a different namespace")
 	MachineGivenNameHashLength         = 8
 	MachineGivenNameTrimSize           = 2
 )
@@ -792,7 +792,7 @@ func (h *Headscale) RegisterMachineFromAuthCallback(
 
 			// Registration of expired machine with different namespace
 			if registrationMachine.ID != 0 && registrationMachine.NamespaceID != namespace.ID {
-				return nil, errDifferentRegisteredNamespace
+				return nil, ErrDifferentRegisteredNamespace
 			}
 
 			registrationMachine.NamespaceID = namespace.ID