gitee.com/bomy/docker.git@v1.13.1/pkg/platform/architecture_linux.go (about) 1 // Package platform provides helper function to get the runtime architecture 2 // for different platforms. 3 package platform 4 5 import ( 6 "syscall" 7 ) 8 9 // runtimeArchitecture gets the name of the current architecture (x86, x86_64, …) 10 func runtimeArchitecture() (string, error) { 11 utsname := &syscall.Utsname{} 12 if err := syscall.Uname(utsname); err != nil { 13 return "", err 14 } 15 return charsToString(utsname.Machine), nil 16 }