the code has been moved before append

Signed-off-by: Yalcin Ozbek <yalcinozbekceng@gmail.com>
pull/1373/head
Yalcin Ozbek 2 years ago
parent 4314a0567b
commit 8bf7f37fca
No known key found for this signature in database
GPG Key ID: BB0DF4A7800295ED

@ -285,10 +285,6 @@ func InfoWithContext(ctx context.Context) ([]InfoStat, error) {
c.Microcode = value
}
}
if c.CPU >= 0 {
finishCPUInfo(&c)
ret = append(ret, c)
}
if c.VendorID == "ARM" && c.ModelName == "" {
if v, err := strconv.ParseUint(c.Model, 0, 16); err == nil {
modelName, exist := armModelToModelName[v]
@ -299,6 +295,10 @@ func InfoWithContext(ctx context.Context) ([]InfoStat, error) {
}
}
}
if c.CPU >= 0 {
finishCPUInfo(&c)
ret = append(ret, c)
}
return ret, nil
}

Loading…
Cancel
Save