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