Reputation: 29
Go/VSCode keeps telling me to go get a package from github, when it is a subfolder which I own.
I have already replaced the route in my go.mod to be a private folder path:
replace (
github.com/brianmaksy/m-highscore v0.0.0 => ./
)
The error message that keeps popping up is:
cli\server\main.go:7:2: no required module provides package github.com/brianmaksy/m-highscore/internal; to add it:
go get github.com/brianmaksy/m-highscore/internal
If anyone has an idea of what might be wrong, I'd be very grateful. Thanks in advance.
Upvotes: 1
Views: 404
Reputation: 29
I have found the solution. The problem appears to be that "internal" was an empty folder". As soon as I changed the import to:
internal "github.com/brianmaksy/m-highscore/internal/server"
the problem was gone.
Keeping this question here in case it helps anyone in the future.
Upvotes: 1