3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #16660 from nathan7/tarsum

dockerTools: disable compression in tarsum.go
This commit is contained in:
Franz Pletz 2016-07-19 10:18:41 +02:00 committed by GitHub
commit 1109b236cf

View file

@ -1,24 +1,24 @@
package main package main
import ( import (
"tarsum" "fmt"
"io" "io"
"io/ioutil" "io/ioutil"
"fmt" "os"
"os" "tarsum"
) )
func main() { func main() {
ts, err := tarsum.NewTarSum(os.Stdin, false, tarsum.Version1) ts, err := tarsum.NewTarSum(os.Stdin, true, tarsum.Version1)
if err != nil { if err != nil {
fmt.Println(err) fmt.Println(err)
os.Exit(1) os.Exit(1)
} }
if _, err = io.Copy(ioutil.Discard, ts); err != nil { if _, err = io.Copy(ioutil.Discard, ts); err != nil {
fmt.Println(err) fmt.Println(err)
os.Exit(1) os.Exit(1)
} }
fmt.Println(ts.Sum(nil)) fmt.Println(ts.Sum(nil))
} }