mohi666
mohi666

Reputation: 7052

Managing Go dependencies on git

I develop and maintain my Go project in the following directory:

PROJECT_DIR=$GOPATH/src/github.com/<USERNAME>/<PROJECT_NAME>/main.go
PROJECT_DIR=$GOPATH/src/github.com/<USERNAME>/<PROJECT_NAME>/<APP-1>
PROJECT_DIR=$GOPATH/src/github.com/<USERNAME>/<PROJECT_NAME>/<APP-2>

But this way I can only track changes in my project and I cannot track dependencies and their versions.

I was wondering if there's an automated way of cloning all the dependencies using the version that my project is using and not the latest commit?

Upvotes: 1

Views: 58

Answers (1)

Daniel
Daniel

Reputation: 38849

You should look at Glide.

Glide provides simplified Go project management, dependency management, and vendoring.

Glide basically changes your $GOPATH on the fly and keeps copies of your dependencies in a local structure instead of the global structure that is customary for a standard Go environment.

Upvotes: 2

Related Questions