helper: implementation of helper.Helper using bwrap

Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
This commit is contained in:
2024-10-08 18:02:38 +09:00
parent c6223771db
commit 7c7999e9e5
4 changed files with 340 additions and 14 deletions

View File

@@ -23,11 +23,15 @@ var (
argsWt = helper.MustNewCheckedArgs(wantArgs)
)
func argF(argsFD int, statFD int) []string {
func argF(argsFD, statFD int) []string {
if argsFD == -1 {
panic("invalid args fd")
}
return argFChecked(argsFD, statFD)
}
func argFChecked(argsFD, statFD int) []string {
if statFD == -1 {
return []string{"--args", strconv.Itoa(argsFD)}
} else {