update csv report for @cmd276
This commit is contained in:
1 parent
f9f80900d8
commit
25f8a0cf22
5 files changed
+29
-1
No files matched your search
@@ -4,6 +4,7 @@
|
||||
*.dll
|
||||
*.so
|
||||
*.dylib
|
||||
FileCompare
|
||||
|
||||
# Test binary, built with `go test -c`
|
||||
*.test
|
||||
|
||||
Generated
+8
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="WEB_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
Generated
+8
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/FileCompare.iml" filepath="$PROJECT_DIR$/.idea/FileCompare.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
Generated
+6
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -139,6 +139,7 @@ func main() {
|
||||
}
|
||||
|
||||
func saveSummary(path string) {
|
||||
fileExists, err := os.Stat(path)
|
||||
summaryFile, err := os.OpenFile(path, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
@@ -146,11 +147,15 @@ func saveSummary(path string) {
|
||||
}
|
||||
defer summaryFile.Close()
|
||||
|
||||
if fileExists == nil {
|
||||
summaryFile.WriteString(fmt.Sprintf("\"%s\",\"%s\",\"%s\",\"%s\"\n", "hash", "filepath", "bytes", "copies"))
|
||||
}
|
||||
|
||||
for hash, files := range ds.Files {
|
||||
if len(files) > 1 {
|
||||
// _, err := summaryFile.WriteString(fmt.Sprintf("%s - %s Duplicates", hash, len(files)))
|
||||
for _, file := range files {
|
||||
summaryFile.WriteString(fmt.Sprintf("\"%s\",\"%s\"\n", hash, filepath.Join(file.Filepath, file.Filename)))
|
||||
summaryFile.WriteString(fmt.Sprintf("\"%s\",\"%s\",\"%d\",\"%d\"\n", hash, filepath.Join(file.Filepath, file.Filename), file.Filesize, len(files)))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user