mirror of
https://github.com/Jguer/yay
synced 2024-10-31 04:12:51 +00:00
Fixes #29. Changed to MiB and KiB and added simple float
This commit is contained in:
parent
eea82fb8ee
commit
812eca3aa5
1 changed files with 3 additions and 2 deletions
|
@ -306,7 +306,7 @@ func BiggestPackages() {
|
||||||
}
|
}
|
||||||
|
|
||||||
for i := 0; i < 10; i++ {
|
for i := 0; i < 10; i++ {
|
||||||
fmt.Printf("%s: \x1B[0;33m%dMB\x1B[0m\n", pkgS[i].Name(), pkgS[i].ISize()/(1024*1024))
|
fmt.Printf("%s: \x1B[0;33m%.1fMiB\x1B[0m\n", pkgS[i].Name(), float32(pkgS[i].ISize())/(1024.0*1024.0))
|
||||||
}
|
}
|
||||||
// Could implement size here as well, but we just want the general idea
|
// Could implement size here as well, but we just want the general idea
|
||||||
}
|
}
|
||||||
|
@ -326,7 +326,8 @@ func HangingPackages() (hanging []string, err error) {
|
||||||
requiredby := pkg.ComputeRequiredBy()
|
requiredby := pkg.ComputeRequiredBy()
|
||||||
if len(requiredby) == 0 {
|
if len(requiredby) == 0 {
|
||||||
hanging = append(hanging, pkg.Name())
|
hanging = append(hanging, pkg.Name())
|
||||||
fmt.Printf("%s: \x1B[0;33m%dMB\x1B[0m\n", pkg.Name(), pkg.ISize()/(1024*1024))
|
fmt.Println(pkg.ISize())
|
||||||
|
fmt.Printf("%s: \x1B[0;33m%.2f KiB\x1B[0m\n", pkg.Name(), float32(pkg.ISize())/(1024.0))
|
||||||
|
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
|
Loading…
Reference in a new issue