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 #85

Open
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
1 participant
@SamWhited
Copy link

SamWhited commented Jan 10, 2019

Hello,

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 library has only one external dependency (and only during testing) which already supports modules, is still v1, and is already using semver compatible tags, the go.mod file is fairly simple. The only other thing that would need to be done is to create a release after this patch is merged (eg. v1.1.1) to allow consumers of this library to pin to a version with the go.mod file.

This is fully backwards compatible because versions of Go older than 1.9.7 will ignore the mod file and import this package as they always have.

I have also taken the liberty of bumping Travis to test against supported versions of Go that are still receiving security updates, if this is incorrect and you support unsupported versions of Go, I'll happily change it back, I just thought it would be easier to test against versions that support modules.

To manage the mod file yourself in the future, use Go 1.11+ and run the command go mod tidy to include all imports in the mod file. To update dependencies, go get can be used as usual (go get -u to update all packages, or go get <library> to pull updates for an individual dep). Note that go get will never up the major version since it tries not to break your build, so you do have to manually bump that if a library makes a breaking change.

EDIT: The test failures appear to be unrelated. Tests are passing, but the coveralls secret isn't being set.

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