2
2
mirror of https://github.com/octoleo/restic.git synced 2024-12-22 10:58:55 +00:00

Refactor formatNode

This commit is contained in:
Michael Eischer 2023-06-08 19:12:49 +02:00
parent 2beaa74892
commit 5f153109ba

View File

@ -16,9 +16,11 @@ func formatNode(path string, n *restic.Node, long bool, human bool) string {
var mode os.FileMode
var target string
size := fmt.Sprintf("%6d", n.Size)
var size string
if human {
size = ui.FormatBytes(n.Size)
} else {
size = fmt.Sprintf("%6d", n.Size)
}
switch n.Type {