fix member name changed problem

pull/4/head
Shirou WAKAYAMA 11 years ago
parent d612aa5931
commit 2b1cc4d012

@ -35,7 +35,7 @@ func CPUInfo() ([]CPUInfoStat, error) {
for _, line := range lines {
fields := strings.Split(line, ":")
if len(fields) < 2 {
if c.VendorId != "" {
if c.VendorID != "" {
ret = append(ret, c)
}
continue

@ -50,7 +50,6 @@ func TestCpuInfo(t *testing.T) {
t.Errorf("error %v", err)
}
for _, vv := range v {
fmt.Println(vv)
if vv.ModelName == "" {
t.Errorf("could not get CPU Info: %v", vv)
}

Loading…
Cancel
Save