Support Go Modules#85
Open
SamWhited wants to merge 1 commit intohusobee:masterfrom
SamWhited:support_modules
Open
Support Go Modules#85SamWhited wants to merge 1 commit intohusobee:masterfrom SamWhited:support_modules
SamWhited wants to merge 1 commit intohusobee:masterfrom
SamWhited:support_modules
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.modfile 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 tidyto include all imports in the mod file. To update dependencies,go getcan be used as usual (go get -uto update all packages, orgo get <library>to pull updates for an individual dep). Note thatgo getwill 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.