VS code Shows BrokenImport While importing a Package in golang?

301 Views Asked by At

i have an issue in VS code while importing a package.VS code shows could not find the Package in GOBIN or GOROOT.But the program runs fine.But the issue is when this Problem arise the intellisense stops working to make it work i need to manually update gopls everytime when i import a packageenter image description here

1

There are 1 best solutions below

1
On

In VS Code try these steps:

  1. ctrl + shift + p
  2. Type Go
  3. Install/Update tools

Should solve most of such cases.