mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-19 13:59:39 +08:00
✏️ 优化 aifalse
This commit is contained in:
parent
2a5c1ac92c
commit
52093f3dd3
@ -56,9 +56,9 @@ func memPercent() float64 {
|
|||||||
func diskPercent() string {
|
func diskPercent() string {
|
||||||
parts, _ := disk.Partitions(true)
|
parts, _ := disk.Partitions(true)
|
||||||
msg := ""
|
msg := ""
|
||||||
for i, p := range parts {
|
for _, p := range parts {
|
||||||
diskInfo, _ := disk.Usage(p.Mountpoint)
|
diskInfo, _ := disk.Usage(p.Mountpoint)
|
||||||
msg += fmt.Sprintf("\n - 分区%d(%dM) %f %%", i, diskInfo.Total/1024/1024, math.Round(diskInfo.UsedPercent))
|
msg += fmt.Sprintf("\n - %s(%dM) %d%%", p.Mountpoint, diskInfo.Total/1024/1024, uint(math.Round(diskInfo.UsedPercent)))
|
||||||
}
|
}
|
||||||
return msg
|
return msg
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user