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
+8
-5
@@ -29,12 +29,15 @@ func getLinuxCpuInfo() (ProcessorInformation, error) {
|
||||
for fileReader.Scan() {
|
||||
line := fileReader.Text()
|
||||
|
||||
if strings.HasPrefix(line, "cpu ") {
|
||||
fields := strings.Split(line, " ")
|
||||
for _, field := range fields {
|
||||
fmt.Print(field)
|
||||
}
|
||||
fields := strings.Split(line, " ")
|
||||
for _, field := range fields {
|
||||
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
|
||||
|
||||
Reference in new issue
Block a user