From 584732f80ab91afb349720cfb8e9979ed2ba173e Mon Sep 17 00:00:00 2001 From: Ophestra Umiker Date: Sat, 2 Nov 2024 03:03:44 +0900 Subject: cmd: shim and init into separate binaries This change also fixes a deadlock when shim fails to connect and complete the setup. Signed-off-by: Ophestra Umiker --- internal/comp.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 internal/comp.go (limited to 'internal/comp.go') diff --git a/internal/comp.go b/internal/comp.go new file mode 100644 index 00000000..e7064db0 --- /dev/null +++ b/internal/comp.go @@ -0,0 +1,12 @@ +package internal + +const compPoison = "INVALIDINVALIDINVALIDINVALIDINVALID" + +var ( + Version = compPoison +) + +// Check validates string value set at compile time. +func Check(s string) (string, bool) { + return s, s != compPoison && s != "" +} -- cgit v1.3.1