Closed AlekSi closed 2 weeks ago
I'm using sloglint 0.7.1 with golangci-lint 1.59.1. My options are: no-mixed-args: true, kv-only: false, attr-only: true.
no-mixed-args: true, kv-only: false, attr-only: true
I have the following line of code:
l.LogAttrs(context.Background(), slog.LevelInfo, "Hello", fields...)
With the options above, it is reported as "key-value pairs should not be used". But LogAttrs accepts ...slog.Attr, not key-value pairs.
LogAttrs
...slog.Attr
Thanks for the report. Can confirm, this is not working as intended. I'll take a look shortly.
I'm using sloglint 0.7.1 with golangci-lint 1.59.1. My options are:
no-mixed-args: true, kv-only: false, attr-only: true
.I have the following line of code:
With the options above, it is reported as "key-value pairs should not be used". But
LogAttrs
accepts...slog.Attr
, not key-value pairs.