flag: move method flag from main

Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
This commit is contained in:
2024-09-13 11:49:10 +09:00
parent da6d238d8a
commit 40d0550ad3
2 changed files with 11 additions and 10 deletions

10
main.go
View File

@@ -16,7 +16,6 @@ import (
"git.ophivana.moe/cat/fortify/internal/app"
"git.ophivana.moe/cat/fortify/internal/state"
"git.ophivana.moe/cat/fortify/internal/system"
"git.ophivana.moe/cat/fortify/internal/util"
"git.ophivana.moe/cat/fortify/internal/verbose"
)
@@ -31,15 +30,6 @@ var (
launchOptionText string
)
func init() {
methodHelpString := "Method of launching the child process, can be one of \"sudo\", \"bubblewrap\""
if util.SdBootedV {
methodHelpString += ", \"systemd\""
}
flag.StringVar(&launchOptionText, "method", "sudo", methodHelpString)
}
func tryVersion() {
if printVersion {
fmt.Println(Version)