Support Go Modules #1
Merged
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 on by default 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 is still below version 2, and has no external dependencies, the
go.modfile is fairly simple. If you accept this PR, the only other thing to do would be to start using semver compatible tags and tag a release of this library that others can pin to (for examplev0.0.1orv1.0.0).Note that I set the language version go 1.9 in the mod file because 1.9.7 is the earliest version with partial support for reading the
go.modfile (earlier versions will keep working as they always have and won't read the go.mod file) and it did not appear that you were using any standard library or language features introduced after 1.9 (it builds fine with 1.9.7).Using modules if future changes are made to this library is relatively simple;
go get -uon Go 1.11 with modules on or 1.12 by default will update dependencies (not a problem here), andgo mod tidywill trim down any dependencies that have been removed from thego.modfile andgo.sumfile (which doesn't exist because there are no dependencies; it's nice to be lean!). I'd be happy to provide more information, or a quick crash course in using modules if you want to familiarize yourself with them, but of course there's not much to do for this library.Thank you for your consideration.