cmd/fsu: allow switch from fpkg

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2025-02-26 19:42:28 +09:00
parent 56539d8db5
commit 45ad788c6d
3 changed files with 38 additions and 19 deletions

21
cmd/fsu/path.go Normal file
View File

@@ -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
}