From 516382c402122ca9669ab9c6ba4b861d7fa642c6 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 20:03:06 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=8E=B7=E5=8F=96host?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- system/host.go | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 system/host.go diff --git a/system/host.go b/system/host.go new file mode 100644 index 0000000..f190d60 --- /dev/null +++ b/system/host.go @@ -0,0 +1,21 @@ +// Package system... +// +// Description : system... +// +// Author : go_developer@163.com<白茶清欢> +// +// Date : 2021-10-12 7:57 下午 +package system + +import ( + "github.com/shirou/gopsutil/host" +) + +// GetHostInfo 获取host信息 +// +// Author : go_developer@163.com<白茶清欢> +// +// Date : 7:57 下午 2021/10/12 +func GetHostInfo() (*host.InfoStat, error) { + return host.Info() +}