Open cfiderer opened 2 weeks ago
The slog.Group() function is the only means to put some grouped data elements between other elements into the log.
slog.Group()
A call like
logger.Info("message", "key1", value1, slog.Group("group", "key2", value2, "key3", value3), "key4", value4)
should be allowed, and the arguments to slog.Group() should be checked for key-value pairs, too.
I completely forgot that slog.Group() existed. I agree, it should not be reported.
The
slog.Group()
function is the only means to put some grouped data elements between other elements into the log.A call like
logger.Info("message", "key1", value1, slog.Group("group", "key2", value2, "key3", value3), "key4", value4)
should be allowed, and the arguments to
slog.Group()
should be checked for key-value pairs, too.