2

I get this warning:

main.go:72: line is 191 characters (lll) klog.Fatalf("no ...") //nolint:lll

I added nolint:lll, but this does not silence this warning.

We use https://golangci-lint.run/

I want to ignore this line only (no global configuration).

guettli
  • 25,042
  • 81
  • 346
  • 663

1 Answers1

4

I am not sure but I think klog.Fatalf() is nothing but a block of code.

Could you please try the below suggestions:

//nolint:all
klog.Fatalf("no ...")

OR

klog.Fatalf("no ...") //nolint:all

OR

klog.Fatalf("no ...") //nolint:golint,unused

For the reference you can refer this link

blackgreen
  • 34,072
  • 23
  • 111
  • 129
Ashutosh Singh
  • 721
  • 3
  • 6