2018-02-05 16:05:59 -05:00
|
|
|
package platform // import "github.com/docker/docker/pkg/platform"
|
2015-11-14 17:03:02 -05:00
|
|
|
|
|
|
|
import (
|
|
|
|
"runtime"
|
|
|
|
|
2017-07-26 17:42:13 -04:00
|
|
|
"github.com/sirupsen/logrus"
|
2015-11-14 17:03:02 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
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
|
|
|
|
}
|