A
A
Artem Prokhorov2021-12-09 22:16:52
go
Artem Prokhorov, 2021-12-09 22:16:52

How to remove check for imported go modules with official extension?

The bottom line is that all imported packages are in fact installed and working. But the extension highlights them in red, indicating an error and writes that it did not find the package either by goroot or by gopath (there are packages and they work, I repeat, when go run main.go the language itself finds them).
Also, when installing this extension, it uses its own paths, while adding /path/src everywhere, even if there is no src folder itself, it simply points to it as an intermediate one. And when you try to specify the correct paths in the settings of the extension itself, it still leaves /path/src at the end (even if you did not write it). I'm just fed up with it and don't want to waste my man-hours on things that don't work because of me.
How to disable path validation on import?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Mirilaczvili, 2021-12-09
@2ord

Since version 1.11, Go modules are used .
There is no need to use either GOROOT or GOPATH.
To satisfy dependencies, I prefer to use go mod tidy.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question