From c5c762da3884b6f4dcb3f640c5bdecd11400ab8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Cie=C5=9Blak?= Date: Mon, 29 Jul 2024 15:51:49 +0200 Subject: [PATCH] Move const to where it's used --- lib/vnet/daemon/client_darwin.go | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/lib/vnet/daemon/client_darwin.go b/lib/vnet/daemon/client_darwin.go index 9387c2dbeca7c..9c53d8a7ee580 100644 --- a/lib/vnet/daemon/client_darwin.go +++ b/lib/vnet/daemon/client_darwin.go @@ -303,6 +303,12 @@ func startByCalling(ctx context.Context, bundlePath string, config Config) error } if errorDomain == nsCocoaErrorDomain && errorCode == errorCodeNSXPCConnectionInterrupted { + const clientNSXPCConnectionInterruptedDebugMsg = "The connection was interrupted when trying to " + + "reach the XPC service. If there's no clear error logs on the daemon side, it might mean that " + + "the client does not satisfy the code signing requirement enforced by the daemon. " + + "Start capturing logs in Console.app and repeat the scenario. Look for " + + "\"xpc_support_check_token: error: status: -67050\" in the logs to verify " + + "that the connection was interrupted due to the code signing requirement." log.DebugContext(ctx, clientNSXPCConnectionInterruptedDebugMsg) errC <- trace.Wrap(errXPCConnectionInterrupted) return @@ -333,13 +339,6 @@ func startByCalling(ctx context.Context, bundlePath string, config Config) error } } -const clientNSXPCConnectionInterruptedDebugMsg = "The connection was interrupted when trying to " + - "reach the XPC service. If there's no clear error logs on the daemon side, it might mean that " + - "the client does not satisfy the code signing requirement enforced by the daemon. " + - "Start capturing logs in Console.app and repeat the scenario. Look for " + - "\"xpc_support_check_token: error: status: -67050\" in the logs to verify " + - "that the connection was interrupted due to the code signing requirement." - func sleepOrDone(ctx context.Context, d time.Duration) error { timer := time.NewTimer(d) defer timer.Stop()