I use go (golang) with vs code on ubuntu 18.04.
I use gopls as laguage server.
my code is organized something like
/package a
f.go
/package moretypes
g.go
and I use type from moretypes in a. meaning in g.go i have:
type MyType stuct{
...}
and in f.go i have:
myType := moretypes.MyType{}
...
and it works just fine from the Go view, but the vs code notify me that myType
is invalid type and it refuse to recognize it and don't let auto completion.
(I used to have the tools that vs code recommend but after i upgrade go to 1.14 some features didn't work and therefor i switched to gopls. )