Signed-off-by: allencloud <allen.sun@daocloud.io> Upstream-commit: aef02273d9cdf8144b95c9c9a8d1e119d24b2d9d Component: engine
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
|
|
}
|