Have been trying to configure go on my laptop for some time now, keep running into errors like $GOPATH/go.mod exists but should not
on powershell when prompted with go emv
.
go version go1.21.0 windows/amd64
"Error loading workspace folders (expected 1, got 0) failed to load view for" is the error I keep getting is Visual Studio Code:
I'm very new to go, I have it configured on my main system perfectly so I am very confused on why it seems to be giving me so much trouble on my laptop. I have looked at every other stack overflow post I can find relating to this and none have seemed to help my issue.
p.s settings.json keeps going blank after there was code in it. I am also getting this error when trying to do go run.\main.go
go : The term 'go' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling
of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ go run .\main
+ ~~
+ CategoryInfo : ObjectNotFound: (go:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException"