Go Get is trying to pull from my workspace instead of https

`$ go get github.com/{user}/{repository}
`can't load package: package github.com/{user}/{repository}: no Go files in C:\Users\{me}\Documents\GoWorkspace\src\github.com\{user}\{repository}

The above output looks to me like it is searching my GOPATH for the get instead of going to github.

My apologies if this is a very basic error, I’m learning from a tutorial and haven’t found anywhere someone else has had this issue.

2 Likes

Unless you are using modules, your GOPATH is searched first.

And whatever there is will be used. You can use go get -u ... to update existing packages in the GOPATH.

3 Likes

It seems to me that you are saying that ‘go get’ is the incorrect command to collect a repository off GitHub since it doesn’t look for https. Is that right? If so is there a different command for this.

2 Likes

It is correct, but it doesn’t fetch things that are already there, unless you use -u to update them.

2 Likes

I guess, It is not available of Git repos that user.

2 Likes

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