github.com/docker/docker@v299999999.0.0-20200612211812-aaf470eca7b5+incompatible/pkg/platform/platform.go (about)

     1  package platform // import "github.com/docker/docker/pkg/platform"
     2  
     3  import (
     4  	"runtime"
     5  
     6  	"github.com/sirupsen/logrus"
     7  )
     8  
     9  var (
    10  	// Architecture holds the runtime architecture of the process.
    11  	Architecture string
    12  	// OSType holds the runtime operating system type (Linux, …) of the process.
    13  	OSType string
    14  )
    15  
    16  func init() {
    17  	var err error
    18  	Architecture, err = runtimeArchitecture()
    19  	if err != nil {
    20  		logrus.Errorf("Could not read system architecture info: %v", err)
    21  	}
    22  	OSType = runtime.GOOS
    23  }