From 673b648bd35285a1dbfc0348716dd6bdd8064a51 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Wed, 26 Feb 2025 19:46:43 +0900 Subject: cmd/fpkg: call app in-process Wrapping fortify is slow, painful and error-prone. Start apps in-process instead. Signed-off-by: Ophestra --- internal/comp.go | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'internal/comp.go') diff --git a/internal/comp.go b/internal/comp.go index e7064db0..89dc0f85 100644 --- a/internal/comp.go +++ b/internal/comp.go @@ -3,10 +3,15 @@ package internal const compPoison = "INVALIDINVALIDINVALIDINVALIDINVALID" var ( - Version = compPoison + version = compPoison ) -// Check validates string value set at compile time. -func Check(s string) (string, bool) { - return s, s != compPoison && s != "" +// check validates string value set at compile time. +func check(s string) (string, bool) { return s, s != compPoison && s != "" } + +func Version() string { + if v, ok := check(version); ok { + return v + } + return "impure" } -- cgit v1.3.1