platform.go 448 B

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