Small underhood changes, linter fixes

This commit is contained in:
eleksir
2025-10-20 21:07:10 +03:00
parent 6c00224f64
commit ff57b0af7d
23 changed files with 218 additions and 172 deletions

View File

@@ -29,13 +29,12 @@ func Init(level string, fileDescriptor *os.File) {
default:
loglevel = slog.LevelInfo
}
opts := &slog.HandlerOptions{
// Use the ReplaceAttr function on the handler options
// to be able to replace any single attribute in the log output
ReplaceAttr: func(groups []string, a slog.Attr) slog.Attr {
ReplaceAttr: func(groups []string, a slog.Attr) slog.Attr { //nolint: revive
// check that we are handling the time key
if a.Key != slog.TimeKey {
return a