From 1226d76055542c5bc95566d8fc6ee5e794349bea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E8=8C=B6=E6=B8=85=E6=AC=A2?= Date: Tue, 12 Oct 2021 19:12:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=8E=B7=E5=8F=96=E5=86=85?= =?UTF-8?q?=E5=AD=98=E4=BF=A1=E6=81=AF=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- system/memory.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 system/memory.go diff --git a/system/memory.go b/system/memory.go new file mode 100644 index 0000000..4b2d813 --- /dev/null +++ b/system/memory.go @@ -0,0 +1,19 @@ +// Package system... +// +// Description : system... +// +// Author : go_developer@163.com<白茶清欢> +// +// Date : 2021-10-12 7:07 下午 +package system + +import "github.com/shirou/gopsutil/mem" + +// GetMemoryInfo 获取内存信息 +// +// Author : go_developer@163.com<白茶清欢> +// +// Date : 7:07 下午 2021/10/12 +func GetMemoryInfo() (*mem.VirtualMemoryStat, error) { + return mem.VirtualMemory() +}