Hi I am new to Go and currently use VS Code as IDE.
I am totally new to back-end development and I am trying to use Go for the job.
While I was teaching myself via Youtube, I faced a problem.
The problem is that the VS Code does not auto-import any package made by me.
I don't know why but I did get some clues about it.
My Guess
also my projects are located at C:\Users\John\Desktop\GoProjects while the gopath=C:\Users\John\go and the goroot=c:\go
Can anyone give me a solution to this?

In my case disabling gopls worked and easily solved the issue.
File -> Preferences -> Settings -> Use Language Server (Type in search box and uncheck it)
Read the complete thread here for detailed information : https://github.com/microsoft/vscode-go/issues/2473
You can also import missing libraries using Command Palette (Cntrl + Shift + P) which is also very simple.
Open the Command Palette and run the command Go: Add Import to get a list of packages that can be imported to your Go file. Choose one and it will get added in the import block of your Go file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With