From 6fa0704dbfdef13d2ab81e19043a3118d6226a13 Mon Sep 17 00:00:00 2001 From: mayowa Date: Fri, 28 Aug 2015 06:56:05 +0100 Subject: [PATCH] fixed: ProcessorId doesnt return a value --- cpu/cpu_windows.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/cpu/cpu_windows.go b/cpu/cpu_windows.go index d148ee4..d70237a 100644 --- a/cpu/cpu_windows.go +++ b/cpu/cpu_windows.go @@ -63,9 +63,14 @@ func CPUInfo() ([]CPUInfoStat, error) { return ret, err } - procID := "" - + var procID string for i, l := range dst { + procID = "" + if l.ProcessorId != nil { + procID = *l.ProcessorId + } + + cpu := CPUInfoStat{ CPU: int32(i), Family: fmt.Sprintf("%d", l.Family),