mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
0ff3c10aa8
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
15 lines
303 B
Go
15 lines
303 B
Go
package platform
|
|
|
|
import (
|
|
"os/exec"
|
|
)
|
|
|
|
// runtimeArchitecture get the name of the current architecture (x86, x86_64, …)
|
|
func runtimeArchitecture() (string, error) {
|
|
cmd := exec.Command("uname", "-m")
|
|
machine, err := cmd.Output()
|
|
if err != nil {
|
|
return "", err
|
|
}
|
|
return string(machine), nil
|
|
}
|