gofumpt lint and misc cleanup (#1682)
* gofumpt lint and misc cleanup * Reorder fileInfo dircounts code to be clearer
This commit is contained in:
1 parent
6cabb0e8e4
commit
a018257d50
10 files changed
+42
-45
No files matched your search
@@ -20,14 +20,13 @@ func copySize(srcs []string) (int64, error) {
|
||||
return total, fmt.Errorf("src does not exist: %q", src)
|
||||
}
|
||||
|
||||
err = filepath.Walk(src, func(path string, info os.FileInfo, err error) error {
|
||||
err = filepath.Walk(src, func(_ string, info os.FileInfo, err error) error {
|
||||
if err != nil {
|
||||
return fmt.Errorf("walk: %s", err)
|
||||
}
|
||||
total += info.Size()
|
||||
return nil
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
return total, err
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user