4

Visual Studio Code does not recognize errors for golang files. It works fine for other programming languages but when i create a go file does not recognize the errors even if i am doing it on purpose. Even the file has no error or has error there is a warning "Error: TypeError: Cannot read property 'get' of undefined"

OS: ubuntu 18.04

visual studio: 1.52.1

golang: 1.14.8

vsgolang error

1 Answer 1

4

VS Code Go extension v0.21.0 introduced this bug which was fixed in v0.21.1.

Read patch notes here -> https://github.com/golang/vscode-go/releases/tag/v0.21.1

VS code will automatically pick up the extension update but requires a restart.

Or you could uninstall extension, re-install extension (v0.21.1 or higher) and reload VS code.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.