removed an if statement from internal:processor:linux_cpu to test functionality
This commit is contained in:
1 parent
ea5e79a46a
commit
dd2dc67e4e
1 file changed
+4
-1
@@ -29,12 +29,15 @@ func getLinuxCpuInfo() (ProcessorInformation, error) {
|
|||||||
for fileReader.Scan() {
|
for fileReader.Scan() {
|
||||||
line := fileReader.Text()
|
line := fileReader.Text()
|
||||||
|
|
||||||
if strings.HasPrefix(line, "cpu ") {
|
|
||||||
fields := strings.Split(line, " ")
|
fields := strings.Split(line, " ")
|
||||||
for _, field := range fields {
|
for _, field := range fields {
|
||||||
fmt.Print(field)
|
fmt.Print(field)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if fileReader.Err() != nil {
|
||||||
|
return ProcessorInformation{}, fmt.Errorf("There was an error while reading /proc/meninfo. Error: %v", fileReader.Err())
|
||||||
}
|
}
|
||||||
|
|
||||||
return ProcessorInformation{}, nil
|
return ProcessorInformation{}, nil
|
||||||
|
|||||||
Reference in new issue
Block a user