From 45ad788c6d03bf368010fa8e2a39028bdf0fc078 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Wed, 26 Feb 2025 19:42:28 +0900 Subject: cmd/fsu: allow switch from fpkg Signed-off-by: Ophestra --- cmd/fsu/path.go | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 cmd/fsu/path.go (limited to 'cmd/fsu/path.go') diff --git a/cmd/fsu/path.go b/cmd/fsu/path.go new file mode 100644 index 00000000..6ed5600e --- /dev/null +++ b/cmd/fsu/path.go @@ -0,0 +1,21 @@ +package main + +import ( + "log" + "path" +) + +const compPoison = "INVALIDINVALIDINVALIDINVALIDINVALID" + +var ( + fmain = compPoison + fpkg = compPoison +) + +func mustCheckPath(p string) string { + if p != compPoison && p != "" && path.IsAbs(p) { + return p + } + log.Fatal("this program is compiled incorrectly") + return compPoison +} -- cgit v1.3.1