DEV Community

loading...

Discussion on: Intro to Modules on Go - Part 1

Collapse
vansikagupta profile image
Vansika Gupta

Hey, I was getting my hands dirty around local go modules and I couldn't find a way to work around using sub-packages of local go modules. The Go compiler will only look inside the GOROOT and will not find it (since it is a sub-package of a go module and hence doesn't resides there). If I use a VCS repo link(say github.com) as my module name, without actually creating a repo, the Go compiler will say that it cannot find the library to import. So I just tried convincing myself that there's actually no work around, but as I'm here, still asking this question, I believe I'm not convinced yet.