mirror of
https://github.com/hanzoai/insights-go.git
synced 2026-09-30 22:46:12 +00:00
22 lines
311 B
Go
22 lines
311 B
Go
//go:build darwin
|
|
|
|
package insights
|
|
|
|
import (
|
|
"os/exec"
|
|
"strings"
|
|
)
|
|
|
|
func getOSInfo() osInfo {
|
|
out, err := exec.Command("sw_vers", "-productVersion").Output()
|
|
if err != nil {
|
|
return osInfo{
|
|
Name: "Mac OS X",
|
|
}
|
|
}
|
|
return osInfo{
|
|
Name: "Mac OS X",
|
|
Version: strings.TrimSpace(string(out)),
|
|
}
|
|
}
|