mirror of
https://github.com/oneclickvirt/basics.git
synced 2025-10-07 09:31:37 +08:00
16 lines
307 B
Go
16 lines
307 B
Go
package system
|
|
|
|
import (
|
|
"os/exec"
|
|
"strings"
|
|
|
|
"github.com/oneclickvirt/basics/model"
|
|
)
|
|
|
|
func getMacOSInfo() {
|
|
out, err := exec.Command("system_profiler", "SPHardwareDataType").Output()
|
|
if err == nil && !strings.Contains(string(out), "error") {
|
|
model.MacOSInfo = strings.Split(string(out), "\n")
|
|
}
|
|
}
|