golangci-lint/test/testdata/sloglint_attr_only.go
2023-10-19 12:42:40 +02:00

14 lines
312 B
Go

//go:build go1.21
//golangcitest:args -Esloglint
//golangcitest:config_path testdata/configs/sloglint_attr_only.yml
package testdata
import "log/slog"
func test() {
slog.Info("msg", slog.Int("foo", 1), slog.Int("bar", 2))
slog.Info("msg", "foo", 1, "bar", 2) // want `key-value pairs should not be used`
}