diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-02-26 19:42:28 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-02-26 19:42:28 +0900 |
| commit | 45ad788c6d03bf368010fa8e2a39028bdf0fc078 (patch) | |
| tree | 66c508f6fd85d23a7c83b2af0310b411ba313ab2 /cmd/fsu/path.go | |
| parent | 56539d8db5f9ce965190d36aac9867907359a7d0 (diff) | |
cmd/fsu: allow switch from fpkg
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'cmd/fsu/path.go')
| -rw-r--r-- | cmd/fsu/path.go | 21 |
1 files changed, 21 insertions, 0 deletions
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 +} |
