From 23e9e33975bf560ec3fd6e5b2e01d7cd9ce1c14e Mon Sep 17 00:00:00 2001 From: Nathan Zadoks Date: Sat, 2 Jul 2016 02:20:02 -0400 Subject: dockerTools: format tarsum.go with gofmt Nearly all Go code on this earth is formatted with gofmt, and it's somewhat surprising to find a Go file that isn't formatted accordingly. --- pkgs/build-support/docker/tarsum.go | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/pkgs/build-support/docker/tarsum.go b/pkgs/build-support/docker/tarsum.go index 4c25f11b71e0..81a3341fff03 100644 --- a/pkgs/build-support/docker/tarsum.go +++ b/pkgs/build-support/docker/tarsum.go @@ -1,24 +1,24 @@ package main import ( - "tarsum" - "io" - "io/ioutil" - "fmt" - "os" + "fmt" + "io" + "io/ioutil" + "os" + "tarsum" ) func main() { - ts, err := tarsum.NewTarSum(os.Stdin, false, tarsum.Version1) - if err != nil { - fmt.Println(err) - os.Exit(1) - } + ts, err := tarsum.NewTarSum(os.Stdin, false, tarsum.Version1) + if err != nil { + fmt.Println(err) + os.Exit(1) + } - if _, err = io.Copy(ioutil.Discard, ts); err != nil { - fmt.Println(err) - os.Exit(1) - } + if _, err = io.Copy(ioutil.Discard, ts); err != nil { + fmt.Println(err) + os.Exit(1) + } - fmt.Println(ts.Sum(nil)) -} \ No newline at end of file + fmt.Println(ts.Sum(nil)) +} -- cgit 1.4.1 From b9284e445b3d27532c3493eb0fc09822b949e817 Mon Sep 17 00:00:00 2001 From: Nathan Zadoks Date: Sat, 2 Jul 2016 02:21:20 -0400 Subject: dockerTools: disable compression in tarsum.go Previously, tarsum would compress the (discarded) tarball produced. That's a waste of CPU, and a waste of time. --- pkgs/build-support/docker/tarsum.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/build-support/docker/tarsum.go b/pkgs/build-support/docker/tarsum.go index 81a3341fff03..ad33bbac75b4 100644 --- a/pkgs/build-support/docker/tarsum.go +++ b/pkgs/build-support/docker/tarsum.go @@ -9,7 +9,7 @@ import ( ) func main() { - ts, err := tarsum.NewTarSum(os.Stdin, false, tarsum.Version1) + ts, err := tarsum.NewTarSum(os.Stdin, true, tarsum.Version1) if err != nil { fmt.Println(err) os.Exit(1) -- cgit 1.4.1