Skip to content

Replace govendor with go mod

Jacob Vosmaer requested to merge jv-gomod into master

Govendor is obsolete, go mod is the new tool to use for dependency management. We already use it in other GitLab Go projects.

The hard thing with this is to get a go.mod that works. The current iteration remains the same the following steps:

# simulate situation before go.mod
git checkout 0fcdbf4 vendor
git reset HEAD
rm go.mod go.sum

# recreate go.mod
go mod init gitlab.com/gitlab-org/gitlab-workhorse
rm -rf vendor
go get honnef.co/go/tools@v0.0.1-2019.2.2
go mod tidy

# end result: working directory clean
git status
Edited by Jacob Vosmaer

Merge request reports