New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Go Modules #27

wants to merge 1 commit into
base: v2


None yet
1 participant
Copy link

SamWhited commented Jan 10, 2019


Please consider supporting Go Modules, the new packaging standard that will be adopted fully in Go 1.12. Experimental support is in Go 1.11 and the new module paths are supported in Go 1.9.7+ and Go 1.10.3+ in a read-only manner for backwards compatibility with all supported versions of Go.

Because this libraries external dependencies already support semver compatible tags, the go.mod file is fairly simple. The only other thing that would need to be done is to create a semver compatible tag after this patch is merged (eg. v2.0.2) to allow other things to pin to that version without having to use the special "incompatible" version string used for projects that are v2 and up but don't have the major version declared in the module line.

As part of this I have reduced the versions of Go this library is tested against to only supported versions of Go that receive security updates, and one more (1.9) because everything appeared to work there and it supported modules. Older versions of go however, should be able to use this package just as they did before since they'll ignore the mod file anyways.

Thank you for your consideration.

EDIT: my only concern is that I'm not sure what the canonical import path for this project is, the readme mentions both and Modules provides some workarounds for the imports IIRC, but it's probably worth having a canonical path all the same.

@SamWhited SamWhited force-pushed the SamWhited:support_modules branch from 9850e59 to 66f421e Jan 10, 2019

@@ -0,0 +1,9 @@

go 1.9

This comment has been minimized.


SamWhited Jan 10, 2019


I just picked this since tests seemed to work fine on 1.9.7 and anything earlier than 1.9 won't read this file anyways.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment