mirror of
https://github.com/JaCoB1123/dupe-finder.git
synced 2025-05-18 06:01:56 +02:00
Print distance with duplicates
This commit is contained in:
parent
eb25a625cb
commit
6059baeeeb
13
main.go
13
main.go
@ -180,24 +180,27 @@ func main() {
|
|||||||
if fileIndex == otherIndex {
|
if fileIndex == otherIndex {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
otherFile := filesMap.Files[otherIndex]
|
otherFile := filesMap.Files[otherIndex]
|
||||||
var distance = hamming.Uint64(file.hash, otherFile.hash)
|
var distance = hamming.Uint64(file.hash, otherFile.hash)
|
||||||
if distance > 5 {
|
if distance > 5 {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if len(currentCluster) == 1 {
|
||||||
|
fmt.Println(currentCluster[0].path)
|
||||||
|
countDupeSets++
|
||||||
|
countInstances++
|
||||||
|
}
|
||||||
currentCluster = append(currentCluster, otherFile)
|
currentCluster = append(currentCluster, otherFile)
|
||||||
|
fmt.Println(otherFile.path, distance)
|
||||||
|
countInstances++
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(currentCluster) <= 1 {
|
if len(currentCluster) <= 1 {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
countDupeSets++
|
|
||||||
for _, file := range currentCluster {
|
|
||||||
countInstances++
|
|
||||||
fmt.Println(file.path)
|
|
||||||
}
|
|
||||||
fmt.Println()
|
fmt.Println()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user