pkg/platform/architecture_freebsd.go
allencloud b8047bf930 fix typos in pkg
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-04-09 21:18:15 +08:00

15 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
}