14 lines
241 B
Go
14 lines
241 B
Go
|
package system
|
||
|
|
||
|
import "github.com/shirou/gopsutil/mem"
|
||
|
|
||
|
func GetVirtualMemory() *mem.VirtualMemoryStat {
|
||
|
stat, _ := mem.VirtualMemory()
|
||
|
return stat
|
||
|
}
|
||
|
|
||
|
func GetSwapMemory() *mem.SwapMemoryStat {
|
||
|
stat, _ := mem.SwapMemory()
|
||
|
return stat
|
||
|
}
|