From bf16d0a6a7a797d8aa46804925ce3b2a65306bb1 Mon Sep 17 00:00:00 2001 From: mayowa Date: Fri, 28 Aug 2015 07:39:20 +0100 Subject: [PATCH] modified PlatformVersion and PlatformFamily string to (somewhat) match the output from sysinfo --- host/host_windows.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/host/host_windows.go b/host/host_windows.go index 6ad1314..4e1d44f 100644 --- a/host/host_windows.go +++ b/host/host_windows.go @@ -4,6 +4,7 @@ package host import ( "os" + "fmt" "time" "runtime" "strings" @@ -23,6 +24,7 @@ type Win32_OperatingSystem struct { Version string Caption string ProductType uint32 + BuildNumber string LastBootUpTime time.Time } @@ -100,15 +102,15 @@ func GetPlatformInformation() (platform string, family string, version string, e // PlatformFamily switch osInfo.ProductType { case 1: - family = "Desktop OS" + family = "Standalone Workstation" case 2: - family = "Server OS (Domain Controller)" + family = "Server (Domain Controller)" case 3: - family = "Server OS" + family = "Server" } // Platform Version - version = osInfo.Version + version = fmt.Sprintf("%s Build %s", osInfo.Version, osInfo.BuildNumber) return } -- GitLab