refactor: unify error handling

This commit is contained in:
2025-09-03 21:09:42 +02:00
parent 6db6127522
commit 863171f66b
6 changed files with 54 additions and 40 deletions

23
main.go
View File

@@ -1,13 +1,30 @@
package main
import (
"fmt"
"os"
"git.0x0001f346.de/andreas/ablage/app"
"git.0x0001f346.de/andreas/ablage/config"
"git.0x0001f346.de/andreas/ablage/filesystem"
)
func main() {
config.Init()
filesystem.Init()
app.Init()
err := config.Init()
if err != nil {
fmt.Fprintf(os.Stderr, "[Error] %v\n", err)
os.Exit(1)
}
err = filesystem.Init()
if err != nil {
fmt.Fprintf(os.Stderr, "[Error] %v\n", err)
os.Exit(1)
}
err = app.Init()
if err != nil {
fmt.Fprintf(os.Stderr, "[Error] %v\n", err)
os.Exit(1)
}
}