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

Switch to go modules #188

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
285 changes: 0 additions & 285 deletions Gopkg.lock

This file was deleted.

62 changes: 0 additions & 62 deletions Gopkg.toml

This file was deleted.

1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
# but csi-sanity has its own build rules and only mock-driver gets
# published as a container image.
CMDS=mock-driver
export GOFLAGS=-mod=vendor
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strictly speaking, we currently don't need to set GOFLAGS=-mod=vendor because when building in GOPATH, go 1.12 still defaults to non-module builds and then uses vendor. I checked with strace. But I agree that it makes sense to already add GOFLAGS=-mod=vendor because then we won't forget to add it when updating to 1.13 where modules are on by default.

How to do it is a bit trickier. The way it is done here overrides whatever GOFLAGS the developer may have in his environment. make GOFLAGS=... can be used to override this default.

I think I prefer to not set GOFLAGS for developers. Just set it for CI builds, by adding it to release-tools/travis.yml and release-tools/prow.sh.

all: build build-sanity

include release-tools/build.make
Expand Down
19 changes: 19 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module github.com/kubernetes-csi/csi-test

go 1.12

require (
github.com/container-storage-interface/spec v1.1.0
github.com/golang/mock v1.2.0
github.com/golang/protobuf v1.3.1
github.com/konsorten/go-windows-terminal-sequences v1.0.2 // indirect
github.com/onsi/ginkgo v1.8.0
github.com/onsi/gomega v1.5.0
github.com/sirupsen/logrus v1.4.0
golang.org/x/crypto v0.0.0-20190313024323-a1f597ede03a // indirect
golang.org/x/net v0.0.0-20190320064053-1272bf9dcd53
golang.org/x/sys v0.0.0-20190318195719-6c81ef8f67ca // indirect
google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19 // indirect
google.golang.org/grpc v1.19.0
gopkg.in/yaml.v2 v2.2.2
)
Loading