+ if *allHashes {
+ hashesOur := make(map[string]string, len(sums))
+ for _, h := range sums {
+ hashesOur[h.Type] = h.Hash
+ }
+ for _, h := range f.Hashes {
+ hashOur := hashesOur[h.Type]
+ if h.Hash == hashOur {
+ fmt.Println(f.Name, h.Type, "good")
+ } else {
+ fmt.Println(
+ "hash mismatch:", f.Name, h.Type,
+ "our:", hashOur,
+ "their:", h.Hash,
+ )
+ bad = true
+ }
+ }
+ } else {
+ hashOur := sums[0].Hash
+ if hashOur == hashTheir {
+ fmt.Println(f.Name, hashName, "good")
+ } else {
+ fmt.Println(
+ "hash mismatch:", f.Name, hashName,
+ "our:", hashOur,
+ "their:", hashTheir,
+ )
+ bad = true
+ continue
+ }
+ }
+ }
+ if len(toCheck) != 0 {
+ fmt.Println("not all FILEs met")
+ bad = true