mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-02-04 12:40:07 +00:00
dep::gopsutil bump version to v3
This commit is contained in:
@@ -4,15 +4,16 @@ import (
|
||||
"log"
|
||||
"os/exec"
|
||||
|
||||
"github.com/shirou/gopsutil/disk"
|
||||
"github.com/shirou/gopsutil/v3/disk"
|
||||
)
|
||||
|
||||
func main() {
|
||||
dparts, _ := disk.Partitions(false)
|
||||
for _, part := range dparts {
|
||||
u, _ := disk.Usage(part.Mountpoint)
|
||||
log.Printf("Part:%v", part)
|
||||
log.Printf("Usage:%v", u)
|
||||
if u != nil {
|
||||
log.Printf("%s %d %d", part.Device, u.Total, u.Used)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user