mirror of
https://github.com/hanzoai/insights-go.git
synced 2026-09-30 22:46:12 +00:00
22 lines
331 B
Go
22 lines
331 B
Go
//go:build !linux && !darwin && !windows
|
|
|
|
package insights
|
|
|
|
import "runtime"
|
|
|
|
var osNameMap = map[string]string{
|
|
"freebsd": "FreeBSD",
|
|
"android": "Android",
|
|
"ios": "iOS",
|
|
}
|
|
|
|
func getOSInfo() osInfo {
|
|
name := runtime.GOOS
|
|
if mapped, ok := osNameMap[runtime.GOOS]; ok {
|
|
name = mapped
|
|
}
|
|
return osInfo{
|
|
Name: name,
|
|
}
|
|
}
|