From c479c756d7d56d0023e24bfd82f688badbcb4d01 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Tue, 30 Jul 2024 22:33:53 +0200 Subject: [PATCH] use log instead of fmt --- main.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 44161f5..38fbeba 100644 --- a/main.go +++ b/main.go @@ -1,7 +1,6 @@ package main import ( - "fmt" "log" "os" "os/exec" @@ -30,7 +29,7 @@ func main() { recv := i3.Subscribe(i3.WorkspaceEventType) if len(os.Args) != 2 { - fmt.Errorf("Configuration required!") + log.Printf("[ERROR] Configuration required!") os.Exit(1) } @@ -39,12 +38,14 @@ func main() { if err != nil { log.Printf("[error] %s", err.Error()) + os.Exit(1) } err = yaml.Unmarshal(data, &config) if err != nil { log.Printf("[error] %s", err.Error()) + os.Exit(1) } for recv.Next() {