--- a/goduf.go Sun Oct 14 15:44:28 2018 +0200
+++ b/goduf.go Sun Oct 14 15:45:30 2018 +0200
@@ -61,12 +61,14 @@
// Results contains the results of the duplicates search
type Results struct {
- Groups []ResultSet `json:"groups"`
- Duplicates uint `json:"duplicates"`
- NumberOfSets uint `json:"number_of_sets"`
- RedundantDataSize uint64 `json:"redundant_data_size"`
- RedundantDataSizeH string `json:"redundant_data_size_h"`
- TotalFileCount uint `json:"total_file_count"`
+ Groups []ResultSet `json:"groups"` // List of duplicate sets
+ Duplicates uint `json:"duplicates"` // Number of duplicates
+ NumberOfSets uint `json:"number_of_sets"` // Number of duplicate sets
+ RedundantDataSize uint64 `json:"redundant_data_size"` // Redundant data size
+ RedundantDataSizeH string `json:"redundant_data_size_h"` // Same, human-readable
+ TotalFileCount uint `json:"total_file_count"` // Total number of checked files
+ TotalSize uint64 `json:"total_size"` // Total size for checked files
+ TotalSizeH string `json:"total_size_h"` // Same, human-readable
}
// ResultSet contains a group of identical duplicate files
@@ -532,6 +534,8 @@
results.NumberOfSets = uint(len(results.Groups))
results.RedundantDataSizeH = formatSize(results.RedundantDataSize, true)
results.TotalFileCount = data.cmpt
+ results.TotalSize = data.totalSize
+ results.TotalSizeH = formatSize(data.totalSize, true)
return results, nil
}