2015-11-14 22:03:02 +00:00
|
|
|
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
|
2015-11-19 13:55:57 +00:00
|
|
|
Architecture, err = runtimeArchitecture()
|
2015-11-14 22:03:02 +00:00
|
|
|
if err != nil {
|
|
|
|
logrus.Errorf("Could no read system architecture info: %v", err)
|
|
|
|
}
|
|
|
|
OSType = runtime.GOOS
|
|
|
|
}
|