mirror of
https://github.com/ipfs/kubo.git
synced 2025-08-06 11:31:54 +08:00
Add MaxStorage field to output of "repo stat".
License: MIT Signed-off-by: Kevin Atkinson <k@kevina.org>
This commit is contained in:
@ -189,6 +189,12 @@ Version string The repo version.
|
||||
} else {
|
||||
fmt.Fprintf(buf, "RepoSize \t %d\n", stat.RepoSize)
|
||||
}
|
||||
maxSizeInMiB := stat.StorageMax / (1024 * 1024)
|
||||
if human && maxSizeInMiB > 0 {
|
||||
fmt.Fprintf(buf, "StorageMax (MiB) \t %d\n", maxSizeInMiB)
|
||||
} else {
|
||||
fmt.Fprintf(buf, "StorageMax \t %d\n", stat.StorageMax)
|
||||
}
|
||||
fmt.Fprintf(buf, "RepoPath \t %s\n", stat.RepoPath)
|
||||
fmt.Fprintf(buf, "Version \t %s\n", stat.Version)
|
||||
|
||||
|
Reference in New Issue
Block a user