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 }