2015-11-15 01:03:02 +03: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 16:55:57 +03:00
|
|
|
Architecture, err = runtimeArchitecture()
|
2015-11-15 01:03:02 +03:00
|
|
|
if err != nil {
|
2016-04-09 16:18:15 +03:00
|
|
|
logrus.Errorf("Could not read system architecture info: %v", err)
|
2015-11-15 01:03:02 +03:00
|
|
|
}
|
|
|
|
OSType = runtime.GOOS
|
|
|
|
}
|