mirror of
https://github.com/hanzoai/insights-go.git
synced 2026-09-30 22:46:12 +00:00
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]>
This commit is contained in:
committed by
GitHub
co-authored by
Manoel Aranda Neto
parent
ac804e294e
commit
73785c570c
@@ -0,0 +1,17 @@
|
||||
//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),
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user