How to ignore files in vscode-go?

Running vscode-go in my project I get some false-alarm “Problems” because vscode-go is processing .go files which are not part of the actual code:
-nD4

How can I make vscode-go ignore these files?

I don’t think you can configure that. Why do you have .go files in your project directory that are not actually part of the project? Can you put them somewhere else?

Why do you have .go files in your project directory that are not actually part of the project?

Because I embed them.

Can you put them somewhere else?

No, since Go only supports embedding files which are located beneath the embedding package in the file tree.

Rename them.

you can try use this: //go:build ignore

1 Like

Thank you! This works for now.

Ideally I would be able to ignore them without having to modify the Go files themselves.

Thanks for sharing, Very helpful and informative for my walgreenslistens.