aboutsummaryrefslogtreecommitdiffhomepage
path: root/state.go
diff options
context:
space:
mode:
authorOphestra Umiker <cat@ophivana.moe>2024-11-04 23:08:29 +0900
committerOphestra Umiker <cat@ophivana.moe>2024-11-05 00:07:36 +0900
commit714818c8aa1a26450cdfac0828d1a9528fdb95a4 (patch)
tree2eb55d76b5cd885d915ca19033cff514dcafd5f4 /state.go
parent69cc64ef56c4b46954514d7ef1b93b3861443255 (diff)
fortify: implement cleaner argument structure
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
Diffstat (limited to 'state.go')
-rw-r--r--state.go35
1 files changed, 0 insertions, 35 deletions
diff --git a/state.go b/state.go
deleted file mode 100644
index 3a3f9a68..00000000
--- a/state.go
+++ /dev/null
@@ -1,35 +0,0 @@
-package main
-
-import (
- "flag"
- "fmt"
- "text/tabwriter"
-
- "git.ophivana.moe/security/fortify/internal/fmsg"
- "git.ophivana.moe/security/fortify/internal/state"
-)
-
-var (
- stateActionEarly bool
-)
-
-func init() {
- flag.BoolVar(&stateActionEarly, "state", false, "print state information of active launchers")
-}
-
-// tryState is called after app initialisation
-func tryState() {
- if stateActionEarly {
- var w *tabwriter.Writer
- state.MustPrintLauncherStateSimpleGlobal(&w, os.Paths().RunDirPath)
- if w != nil {
- if err := w.Flush(); err != nil {
- fmsg.Println("cannot format output:", err)
- }
- } else {
- fmt.Println("No information available")
- }
-
- fmsg.Exit(0)
- }
-}