From 0e77fe3e3dc461573d21b21923fada8dc60e650b Mon Sep 17 00:00:00 2001 From: netbenix Date: Sat, 20 Nov 2021 13:10:33 +0100 Subject: [PATCH] Added some SysInfo --- Lotus/SysInfo.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 Lotus/SysInfo.go diff --git a/Lotus/SysInfo.go b/Lotus/SysInfo.go new file mode 100644 index 0000000..ea3816f --- /dev/null +++ b/Lotus/SysInfo.go @@ -0,0 +1,18 @@ +package Lotus + +import ( + "runtime" +) + +func Platform() string{ + return runtime.GOOS +} + +func Architecture() []string { + + if runtime.GOARCH == "amd64" { + return []string{"amd64", "i386"} + } + + return []string{runtime.GOARCH} +}