From bb5b0a6417fa3dd8b8501ae677ff6f79afa8c679 Mon Sep 17 00:00:00 2001 From: Jorian van Oostenbrugge Date: Fri, 13 Sep 2019 21:27:00 +0200 Subject: [PATCH] It turns out to make go modules work we have to set the GO111MODULE environment variable to 'on' after we perform the 'go get', as not all packages have support for go modules yet. --- .devcontainer/Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 3d9e5b0..c28b40e 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -35,7 +35,7 @@ RUN apt-get update \ USER $USERNAME - # Install gocode-gomod +# Install gocode-gomod RUN go get -x -d github.com/stamblerre/gocode 2>&1 \ && go build -o gocode-gomod github.com/stamblerre/gocode \ && mv gocode-gomod $GOPATH/bin/ \ @@ -65,3 +65,6 @@ RUN go get -x -d github.com/stamblerre/gocode 2>&1 \ github.com/golangci/golangci-lint/cmd/golangci-lint \ github.com/mgechev/revive \ github.com/derekparker/delve/cmd/dlv 2>&1 + +# Uncomment the line below if you are using go modules +# ENV GO111MODULE=on \ No newline at end of file