fixed: ProcessorId doesnt return a value

This commit is contained in:
mayowa 2015-08-28 06:56:05 +01:00
parent ee43e655c2
commit 6fa0704dbf
1 changed files with 7 additions and 2 deletions

View File

@ -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),