github.com/olljanat/moby@v1.13.1/pkg/platform/platform.go (about)

     1  package 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  }