diff options
author | Christian Pointner <equinox@helsinki.at> | 2017-01-28 00:55:11 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@helsinki.at> | 2017-01-28 00:55:11 (GMT) |
commit | 5fb5067d753fc2b0b95d1734c7fbf72f619cdc71 (patch) | |
tree | 874c37b3db22a947f28ea34d0632904f07af0f5b /src/pool-import | |
parent | 025ccb8054087c664acc6f78d9cf51f563326a80 (diff) |
also add file size to file hasher output
Diffstat (limited to 'src/pool-import')
-rw-r--r-- | src/pool-import/file-hasher.go | 7 | ||||
-rw-r--r-- | src/pool-import/main.go | 4 |
2 files changed, 8 insertions, 3 deletions
diff --git a/src/pool-import/file-hasher.go b/src/pool-import/file-hasher.go index df58a8e..1160aba 100644 --- a/src/pool-import/file-hasher.go +++ b/src/pool-import/file-hasher.go @@ -30,7 +30,12 @@ import ( "time" ) -type FileMap map[string]string +type File struct { + Path string + Size int64 +} + +type FileMap map[string]File func openGroupConfig(group string) (*os.File, error) { cwd, err := filepath.Abs(".") diff --git a/src/pool-import/main.go b/src/pool-import/main.go index cd52c2f..025c76f 100644 --- a/src/pool-import/main.go +++ b/src/pool-import/main.go @@ -103,8 +103,8 @@ func main() { stdlog.Println("") stdlog.Printf(" %d files", len(files)) stdlog.Println("****************************") - for hash, path := range files { - stdlog.Printf("%s: %s", hash, path) + for hash, file := range files { + stdlog.Printf("%s: %s (%d bytes)", hash, file.Path, file.Size) } stdlog.Println("****************************") |