From a1663344f62f3cd3497326c23a26798e4683f012 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Thu, 8 Jan 2015 23:09:06 -0700 Subject: [PATCH] Add "gofmt" from Go 1.3.3 Signed-off-by: Andrew "Tianon" Page Upstream-commit: b20363c4c056bebe256f0d53283ca1e537ed5cf6 Component: engine --- components/engine/Dockerfile | 4 ++++ components/engine/api/client/utils.go | 5 +---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/components/engine/Dockerfile b/components/engine/Dockerfile index 6f97513a97..3069d138da 100644 --- a/components/engine/Dockerfile +++ b/components/engine/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/components/engine/api/client/utils.go b/components/engine/api/client/utils.go index 0ee02cdbce..f330a6840e 100644 --- a/components/engine/api/client/utils.go +++ b/components/engine/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) } }()