-
Notifications
You must be signed in to change notification settings - Fork 247
Problem downloading package into project using go modules #193
Comments
Yep, I just stumbled across the same problem. This package is unusable with the go.mod file in it.
Furthermore, the module file claims to be v2, but go get with v2 fails as well:
|
To work around this issue, I fixed it in a temporary fork, you can do:
|
@zaddok still gettiing errors.
|
I worked out why, I fixed it, and tested it, and now this works:
Hopefully it can get fixed in the main branch soon. It turns out, when you do the tag, (i.e. |
@zaddok |
@ahmdrz any plans on fixing this? I can fix it and create a pull request if need be. Although it's only one line. |
Hi @Gee5ive. |
The reason I didn’t do a patch request is because fixing the issue appears to require both an update to the go.mod and also fixing how the project is tagged. (That’s why I bumped the major version number in my fork) I don’t think editing the go.mod alone will fix it, the patch here doesn’t bump from v2 to v3 |
@zaddok what's the reason the tag has to be updated? Just to test things out, I forked the repo and only updated the go.mod then ran go get github.com/Gee5ive/goinsta/v4 and it worked fine on my end without adding any tags. In any case, I'm not going to open a request, as there's really no way for me to accurately test if it will work once the upstream is updated. I don't think a contributor should be the one to update anything having to do with versioning. Hopefully, @ahmdrz can get around to fixing this when there is time. |
@Gee5ive Go modules require semver tags, see #203 and go modules documentation |
@krylovsk Thanks, I learned something new today. Was'nt familiar with the replace directive. |
Does everybody accept #203? I'm not familiar with |
As you can see, I am still learning myself. I had to fix the .mod file, and add a semver tag to make it work. I assume if you do that it will work. I suspect that the problem might be that you can’t start adding v2 into a project until you are using semver tags. (Once you add the v2, certain expectations are imposed) (I bumped the major version to v3, I’m not sure if that was necessary though. I only did that as I was in a hurry to get it to work) PS: aside from this particular issue your Instagram library is great. Thanks! |
I am attempting to download this package into a project that is a go module outside of GOPATH and I keep getting the following error,
if I download the package without it being part of a module there's no issues, any clue as to what's going wrong here?
The text was updated successfully, but these errors were encountered: