Use go mod
Govendor is obsolete, go mod is the new way to manage dependencies in Go.
I used the following script to check that the go.mod file is "right", or at least stable:
sh -c '
set -xe
# simulate situation before go.mod
cd go
git checkout f34e2cd vendor
git reset HEAD
rm go.mod go.sum
# create go.mod
go mod init gitlab.com/gitlab-org/gitlab-shell/go
rm -rf vendor
# force go to download / resolve dependencies
cd ..
bin/compile
support/go-test
# check if go.mod looks different
cd go
go mod tidy
git status
'
I include the information above because this diff is so huge, it's very hard to know what's changing. The script above proves that at least we're doing whatever go mod
's auto-govendor-migrator does.
Edited by Ash McKenzie