refactor: use slog instead of log
Some checks are pending
Go CI Pipeline / ci (push) Waiting to run
Release Builds / GoReleaser build (push) Successful in 1m4s

This commit is contained in:
Patryk Hegenberg 2025-06-11 22:41:48 +02:00
parent fcffccc145
commit d8743e54c1
8 changed files with 180 additions and 165 deletions

View file

@ -1,18 +1,20 @@
package main
import (
"log"
"fmt"
"log/slog"
"os"
)
func main() {
app, err := NewApp()
if err != nil {
log.Fatalf("ERROR: Unable to setup application: %v", err)
slog.Error(fmt.Sprintf("Unable to setup application: %v", err))
os.Exit(1)
}
defer func() {
if err := app.Close(); err != nil {
log.Printf("ERROR: Failed to close application resources: %v", err)
slog.Error(fmt.Sprintf("Failed to close application resources: %v", err))
}
}()