aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/comp.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-02-26 19:46:43 +0900
committerOphestra <cat@gensokyo.uk>2025-02-26 19:51:44 +0900
commit673b648bd35285a1dbfc0348716dd6bdd8064a51 (patch)
tree7fa388c20fb7509060964e0380f744bf9178a006 /internal/comp.go
parent45ad788c6d03bf368010fa8e2a39028bdf0fc078 (diff)
cmd/fpkg: call app in-process
Wrapping fortify is slow, painful and error-prone. Start apps in-process instead. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/comp.go')
-rw-r--r--internal/comp.go13
1 files changed, 9 insertions, 4 deletions
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"
}