fix member name changed problem
This commit is contained in:
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…
Reference in New Issue