Skip to content
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

Add Go module support #162

Closed
wants to merge 1 commit into from
Closed

Conversation

muhlemmer
Copy link

@muhlemmer muhlemmer commented Mar 27, 2020

This PR adds a go.mod file and closes #152

As per recommendations from the Go Modules wiki page:

  1. To fully implement this module support a new major release needs to be done (v3)
  2. Therefore, I've changed import paths in this package to reflect this: log "github.com/inconshreveable/log15/v3"
  3. Readme is updated accordingly.
  4. Personal experience: Go expects a 3-numbered version, or modules will not work. So next release should be tagged like v3.0.0
  5. It is recommended (but not required) to keep a separate v3 branch from which v3 releases are done. This has to do with long term support of individual module versions.

Go version support

Modules is supported by Go versions 1.9.7+, 1.10.3+, or 1.11+. 1.9 is the lowest version in .travis.yml. Hence, go.mod has go 1.9 as minimal supported version for this package.

Tested

I've done a test release on my own fork of this repository to verify things are done right. I've tested go get and module versioning in a dependent package.

Note: package name in my test release reflects my own repository path, while this PR reflects github.com/inconshreveable/log15

In go.mod:

require github.com/usrpro/log15/v3 v3.1.0

Import:

import log "github.com/usrpro/log15/v3"

Ran:

$ go get -u -v ./...
go: downloading github.com/usrpro/log15/v3 v3.1.0
github.com/usrpro/log15/v3

All worked OK ☑️

@kishaningithub
Copy link

@inconshreveable It would be awesome if this pr can be merged

@muhlemmer muhlemmer closed this Apr 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Please add a go.mod file
2 participants