Fixed missing error handling, error msg
This commit is contained in:
parent
026f5023a8
commit
90ffa84856
|
@ -11,7 +11,7 @@ func TestCpu_times(t *testing.T) {
|
|||
t.Errorf("error %v", err)
|
||||
}
|
||||
if len(v) == 0 {
|
||||
t.Errorf("could not get CPUs ", err)
|
||||
t.Error("could not get CPUs ", err)
|
||||
}
|
||||
empty := CPUTimesStat{}
|
||||
for _, vv := range v {
|
||||
|
|
|
@ -41,7 +41,9 @@ func getTerminalMap() (map[uint64]string, error) {
|
|||
|
||||
for _, name := range termfiles {
|
||||
stat := syscall.Stat_t{}
|
||||
syscall.Stat(name, &stat)
|
||||
if err = syscall.Stat(name, &stat); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
rdev := uint64(stat.Rdev)
|
||||
ret[rdev] = strings.Replace(name, "/dev", "", -1)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue