Added some SysInfo
This commit is contained in:
parent
da2a4cdfd8
commit
0e77fe3e3d
1 changed files with 18 additions and 0 deletions
18
Lotus/SysInfo.go
Normal file
18
Lotus/SysInfo.go
Normal file
|
|
@ -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}
|
||||||
|
}
|
||||||
Reference in a new issue