mirror of
https://github.com/genuinetools/reg.git
synced 2024-09-19 00:31:02 -04:00
24 lines
446 B
Go
24 lines
446 B
Go
|
package platform
|
||
|
|
||
|
import (
|
||
|
"runtime"
|
||
|
|
||
|
"github.com/sirupsen/logrus"
|
||
|
)
|
||
|
|
||
|
var (
|
||
|
// Architecture holds the runtime architecture of the process.
|
||
|
Architecture string
|
||
|
// OSType holds the runtime operating system type (Linux, …) of the process.
|
||
|
OSType string
|
||
|
)
|
||
|
|
||
|
func init() {
|
||
|
var err error
|
||
|
Architecture, err = runtimeArchitecture()
|
||
|
if err != nil {
|
||
|
logrus.Errorf("Could not read system architecture info: %v", err)
|
||
|
}
|
||
|
OSType = runtime.GOOS
|
||
|
}
|