Add Windows version to correct system info field (#1330)

This commit is contained in:
Maycon Santos 2023-11-24 17:49:39 +01:00 committed by GitHub
parent cf9e447bf0
commit 0ca06b566a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -22,7 +22,7 @@ type Win32_OperatingSystem struct {
func GetInfo(ctx context.Context) *Info { func GetInfo(ctx context.Context) *Info {
osName, osVersion := getOSNameAndVersion() osName, osVersion := getOSNameAndVersion()
buildVersion := getBuildVersion() buildVersion := getBuildVersion()
gio := &Info{Kernel: "windows", OSVersion: buildVersion, Core: osVersion, Platform: "unknown", OS: osName, GoOS: runtime.GOOS, CPUs: runtime.NumCPU()} gio := &Info{Kernel: "windows", OSVersion: osVersion, Core: buildVersion, Platform: "unknown", OS: osName, GoOS: runtime.GOOS, CPUs: runtime.NumCPU()}
systemHostname, _ := os.Hostname() systemHostname, _ := os.Hostname()
gio.Hostname = extractDeviceName(ctx, systemHostname) gio.Hostname = extractDeviceName(ctx, systemHostname)
gio.WiretrusteeVersion = version.NetbirdVersion() gio.WiretrusteeVersion = version.NetbirdVersion()