diff --git a/Dockerfile b/Dockerfile index 6f97513a97..3069d138da 100644 --- a/Dockerfile +++ b/Dockerfile @@ -99,6 +99,10 @@ RUN cd /usr/local/go/src \ # Reinstall standard library with netgo RUN go clean -i net && go install -tags netgo std +# We still support compiling with older Go, so need to grab older "gofmt" +ENV GOFMT_VERSION 1.3.3 +RUN curl -sSL https://storage.googleapis.com/golang/go${GOFMT_VERSION}.$(go env GOOS)-$(go env GOARCH).tar.gz | tar -C /go/bin -xz --strip-components=2 go/bin/gofmt + # Grab Go's cover tool for dead-simple code coverage testing RUN go get golang.org/x/tools/cmd/cover diff --git a/api/client/utils.go b/api/client/utils.go index 0ee02cdbce..f330a6840e 100644 --- a/api/client/utils.go +++ b/api/client/utils.go @@ -260,10 +260,7 @@ func (cli *DockerCli) monitorTtySize(id string, isExec bool) error { sigchan := make(chan os.Signal, 1) gosignal.Notify(sigchan, signal.SIGWINCH) go func() { - // This tmp := range..., _ = tmp workaround is needed to - // suppress gofmt warnings while still preserve go1.3 compatibility - for tmp := range sigchan { - _ = tmp + for _ := range sigchan { cli.resizeTty(id, isExec) } }()