mirror of
https://github.com/nezhahq/nezha.git
synced 2025-02-02 09:38:13 -05:00
fix: correct minor typos
This commit is contained in:
parent
aebc257444
commit
31d4e1eaf9
@ -36,12 +36,11 @@ func GetHost() *model.Host {
|
|||||||
mv, _ := mem.VirtualMemory()
|
mv, _ := mem.VirtualMemory()
|
||||||
ms, _ := mem.SwapMemory()
|
ms, _ := mem.SwapMemory()
|
||||||
u, _ := disk.Partitions(false)
|
u, _ := disk.Partitions(false)
|
||||||
var total uint64 = 0
|
var total uint64
|
||||||
for _, dev := range u {
|
for _, dev := range u {
|
||||||
usage, _ := disk.Usage(dev.Mountpoint)
|
usage, _ := disk.Usage(dev.Mountpoint)
|
||||||
total += usage.Total
|
total += usage.Total
|
||||||
}
|
}
|
||||||
fmt.Println(total)
|
|
||||||
var ip ipDotSbGeoIP
|
var ip ipDotSbGeoIP
|
||||||
resp, err := http.Get("https://api-ipv4.ip.sb/geoip")
|
resp, err := http.Get("https://api-ipv4.ip.sb/geoip")
|
||||||
if err == nil {
|
if err == nil {
|
||||||
@ -84,7 +83,7 @@ func GetState(delay int64) *model.HostState {
|
|||||||
}
|
}
|
||||||
// Disk
|
// Disk
|
||||||
u, _ := disk.Partitions(false)
|
u, _ := disk.Partitions(false)
|
||||||
var used uint64 = 0
|
var used uint64
|
||||||
for _, dev := range u {
|
for _, dev := range u {
|
||||||
usage, _ := disk.Usage(dev.Mountpoint)
|
usage, _ := disk.Usage(dev.Mountpoint)
|
||||||
used += usage.Used
|
used += usage.Used
|
||||||
|
Loading…
Reference in New Issue
Block a user