Files
insights-go/os_info_other.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,
}
}