fix typos in pkg
Signed-off-by: allencloud <allen.sun@daocloud.io>
This commit is contained in:
parent
3f3ba02798
commit
b8047bf930
10 changed files with 12 additions and 12 deletions
|
@ -4,7 +4,7 @@ import (
|
|||
"os/exec"
|
||||
)
|
||||
|
||||
// runtimeArchitecture get the name of the current architecture (x86, x86_64, …)
|
||||
// runtimeArchitecture gets the name of the current architecture (x86, x86_64, …)
|
||||
func runtimeArchitecture() (string, error) {
|
||||
cmd := exec.Command("uname", "-m")
|
||||
machine, err := cmd.Output()
|
||||
|
|
|
@ -6,7 +6,7 @@ import (
|
|||
"syscall"
|
||||
)
|
||||
|
||||
// runtimeArchitecture get the name of the current architecture (x86, x86_64, …)
|
||||
// runtimeArchitecture gets the name of the current architecture (x86, x86_64, …)
|
||||
func runtimeArchitecture() (string, error) {
|
||||
utsname := &syscall.Utsname{}
|
||||
if err := syscall.Uname(utsname); err != nil {
|
||||
|
|
|
@ -36,7 +36,7 @@ const (
|
|||
|
||||
var sysinfo systeminfo
|
||||
|
||||
// runtimeArchitecture get the name of the current architecture (x86, x86_64, …)
|
||||
// runtimeArchitecture gets the name of the current architecture (x86, x86_64, …)
|
||||
func runtimeArchitecture() (string, error) {
|
||||
syscall.Syscall(procGetSystemInfo.Addr(), 1, uintptr(unsafe.Pointer(&sysinfo)), 0, 0)
|
||||
switch sysinfo.wProcessorArchitecture {
|
||||
|
|
|
@ -17,7 +17,7 @@ func init() {
|
|||
var err error
|
||||
Architecture, err = runtimeArchitecture()
|
||||
if err != nil {
|
||||
logrus.Errorf("Could no read system architecture info: %v", err)
|
||||
logrus.Errorf("Could not read system architecture info: %v", err)
|
||||
}
|
||||
OSType = runtime.GOOS
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue