Skip to content
This repository was archived by the owner on Sep 11, 2020. It is now read-only.

all: convert into a Go module #943

Closed
mvdan opened this issue Sep 1, 2018 · 3 comments
Closed

all: convert into a Go module #943

mvdan opened this issue Sep 1, 2018 · 3 comments

Comments

@mvdan
Copy link
Contributor

mvdan commented Sep 1, 2018

Should be straightforward enough. Go modules support gopkg.in without any changes, so we don't have to break backwards compatibility. For example, this worked for me:

cd go-git
go mod init
go mod tidy

Also note that the // import "gopkg.in/src-d/go-git.v4" comment in doc.go should be removed once the commands above have been run, as Go modules make this enforcement of import paths obsolete.

Once we reach v5, it may make sense to transition to another module path, like sourced.tech/go-git/v5.

I've been helping a bit with modules, and have converted most of my repos to them - so I'm happy to help if there are any questions or issues.

cc @mcuadros @smola @campoy

@mvdan
Copy link
Contributor Author

mvdan commented Sep 1, 2018

Of course, the same mechanism can be applied to all the other gopkg.in/src-d repositories.

@mcuadros
Copy link
Contributor

83649a1

We will remove gopkg.in for v5, meanwhile, we keep the gopkg.in comment.

@mvdan
Copy link
Contributor Author

mvdan commented Sep 10, 2018

meanwhile, we keep the gopkg.in comment.

That's fine that you want to keep gopkg.in for v4 - but the vanity import comment should still be removed. It's now the go.mod file that enforces import paths. In particular, see module gopkg.in/src-d/go-git.v4.

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Projects
None yet
Development

No branches or pull requests

3 participants