url_shortener/internal/lib/logger/sl/sl.go

11 lines
145 B
Go
Raw Normal View History

2023-12-08 12:59:55 +02:00
package sl
import "log/slog"
func Err(err error) slog.Attr {
return slog.Attr{
Key: "error",
Value: slog.StringValue(err.Error()),
}
}