aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/app/setup.go
diff options
context:
space:
mode:
authorOphestra Umiker <cat@ophivana.moe>2024-09-12 21:07:05 +0900
committerOphestra Umiker <cat@ophivana.moe>2024-09-12 21:07:05 +0900
commitda6d238d8a15fa583b384b547decbddcda28ff8b (patch)
treee0f8b1364fa09e5a5ec7a1d0e86d13c475cde3eb /internal/app/setup.go
parentb0aff891661dfa2f438a7264607a4e6e9caef026 (diff)
verbose: remove system package interaction
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
Diffstat (limited to 'internal/app/setup.go')
-rw-r--r--internal/app/setup.go14
1 files changed, 5 insertions, 9 deletions
diff --git a/internal/app/setup.go b/internal/app/setup.go
index d8378cfd..c6b44611 100644
--- a/internal/app/setup.go
+++ b/internal/app/setup.go
@@ -8,8 +8,8 @@ import (
"strconv"
"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"
)
type App struct {
@@ -65,11 +65,9 @@ func New(userName string, args []string, launchOptionText string) *App {
a.uid = u
}
- if system.V.Verbose {
- fmt.Println("Running as user", a.Username, "("+a.Uid+"),", "command:", a.command)
- if util.SdBootedV {
- fmt.Println("System booted with systemd as init system (PID 1).")
- }
+ verbose.Println("Running as user", a.Username, "("+a.Uid+"),", "command:", a.command)
+ if util.SdBootedV {
+ verbose.Println("System booted with systemd as init system (PID 1).")
}
switch a.launchOptionText {
@@ -106,9 +104,7 @@ func New(userName string, args []string, launchOptionText string) *App {
os.Exit(1)
}
- if system.V.Verbose {
- fmt.Println("Determined launch method to be", a.launchOptionText, "with tool at", a.toolPath)
- }
+ verbose.Println("Determined launch method to be", a.launchOptionText, "with tool at", a.toolPath)
return a
}