Also list binary identical files

This commit is contained in:
Jan Bader 2023-12-06 16:50:31 +01:00
parent 65ce046585
commit f8564f20ac

16
main.go
View File

@ -188,6 +188,22 @@ func main() {
countInstances := 0 countInstances := 0
countDupeSets := 0 countDupeSets := 0
fmt.Println("Files that are binary identical:")
for hash := range filesMap.FilesByHash {
duplicateFiles := filesMap.FilesByHash[hash]
if len(duplicateFiles) <= 1 {
continue
}
countDupeSets++
for _, file := range duplicateFiles {
countInstances++
fmt.Println(file)
}
fmt.Println()
}
fmt.Println("Images that are similar:")
for len(filesMap.Images) > 0 { for len(filesMap.Images) > 0 {
file := filesMap.Images[0] file := filesMap.Images[0]
filesMap.Images = slices.Delete(filesMap.Images, 0, 1) filesMap.Images = slices.Delete(filesMap.Images, 0, 1)