golang / snappy

The Snappy compression format in the Go programming language.
BSD 3-Clause "New" or "Revised" License
1.52k stars 164 forks source link

Add a go.mod file for basic Go modules support. #46

Closed creachadair closed 5 years ago

creachadair commented 5 years ago

In order to work well with Go modules, this package should have a go.mod file and semantic version tags on release versions. I have provided a rudimentary go.mod file here. Assuming you accept this change, and if you are willing to also git tag v0.0.1 master after it is merged, that would start the release history.

If the API of the package is considered stable, you could instead use v1.0.0, but at that point module users will expect breaking changes to increment the major version. I don't have a clear sense of how much this package is maintained, so v0 would be a safe default for now.

creachadair commented 5 years ago

Ping @nigeltao, do you have any objections to this proposal?

nigeltao commented 5 years ago

I merged your PR (via the GitHub UI), then did a "git pull; git tag v0.0.1 master; git push", but the push seemed to be a no-op. Any suggestions?

(I'm not very good with git. :-)

creachadair commented 5 years ago

@nigeltao A bare git push will not push tags—you can either git push --tags which will push all your local tags to the remote, or git push origin v0.0.1 to push just the one you created here. The latter is generally preferred.

And thank you!

nigeltao commented 5 years ago

Done.