Files
insights-go/os_info_windows.go
T
73785c570c feat: add automatic system context to all events (#167)
* feat: add automatic OS detection to all events

* fixes

* Add android and ios mappings for OS names

* add go_version, os_version and os_distro

* fix: target master branch in CodeQL workflow

---------

Co-authored-by: Manoel Aranda Neto <[email protected]>
2026-03-23 17:40:38 +01:00

18 lines
275 B
Go

//go:build windows
package posthog
import (
"fmt"
"golang.org/x/sys/windows"
)
func getOSInfo() osInfo {
ver := windows.RtlGetVersion()
return osInfo{
Name: "Windows",
Version: fmt.Sprintf("%d.%d.%d", ver.MajorVersion, ver.MinorVersion, ver.BuildNumber),
}
}