fix member name changed problem

This commit is contained in:
Shirou WAKAYAMA 2014-05-16 18:49:50 +09:00
parent d612aa5931
commit 2b1cc4d012
2 changed files with 1 additions and 2 deletions

View File

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

View File

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