Imported package in GOROOT

Hi, I am new to GO. I imported the file in “main.go” file, that in the my project. And all good, but VS code demands, that this file must be in GOROOT. I suppose, that all the imported stuff must be in GOROOT. Is it true? And if it’s not, so how to solve this issue?

VScode should treat the project just fine, if it’s a properly defined module with a go.mod and go.sum file and you import your other package by fully qualified name.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.