govisual-studio-codewarnings

How to disable VSCode warnings from Go src packages?


I'm just starting my journey with Go and wonder why I have warnings about Go source code in the IDE.

enter image description here

Is there an easy way to disable these? Why is VScode even reporting them?

I'm using the default Go extension and 1.22.3 Go version.


Solution

  • I had some very old version of staticcheck (present in go/bin folder).
    After re-installing Go and VScode Go extension, it works without problems.

    Shout to JimB for giving me a hint.