4ee0608373
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
23 lines
448 B
Go
23 lines
448 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 = GetRuntimeArchitecture()
|
|
if err != nil {
|
|
logrus.Errorf("Could no read system architecture info: %v", err)
|
|
}
|
|
OSType = runtime.GOOS
|
|
}
|