В качестве рабочего требования обучение gRPC
через онлайн-курс.
У меня есть проект, определенный в папке greet
(за пределами GOPATH
) с тремя пакетами, называемыми:
greet_client
greet_server
greetpb
In the go.mod
file at the root of my project, I've specified the following:
module example.com/myuser/myproject
go 1.14
The code in greet_server/server.go
makes a reference to greetpb
.
I'm referencing it like the following:
I'm able to run server.go
successfully.
It returns the expected the result:
My question is on the red squiggly lines VSCode throws saying it could not import greetpb:
Here's how package greetpb
is defined (it's an auto generated file):
How can I get rid of this warning message?
Is it something I've not setup properly?
Update:
When I try to ctrl+click
to view the module greetpb
on the file server.go
, I note that it's pointing to the url pkg.go.dev
.
How can I make the program to do a "local" lookup?
введите описание изображения здесь