Signed-off-by: allencloud <allen.sun@daocloud.io> Upstream-commit: aef02273d9cdf8144b95c9c9a8d1e119d24b2d9d Component: engine
16 lines
304 B
Go
16 lines
304 B
Go
package platform
|
|
|
|
import (
|
|
"os/exec"
|
|
)
|
|
|
|
// runtimeArchitecture gets 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
|
|
}
|