Fixed Error return value of is not checked (errcheck)

This commit is contained in:
Holger Obermaier
2026-02-05 14:48:49 +01:00
parent a77cc19ddb
commit 8f49c7aa67
9 changed files with 81 additions and 16 deletions

View File

@@ -188,7 +188,11 @@ func (m *NUMAStatsCollector) Read(interval time.Duration, output chan lp.CCMessa
t.previousValues[key] = value
}
}
file.Close()
if err := file.Close(); err != nil {
cclog.ComponentError(
m.name,
fmt.Sprintf("Read(): Failed to close file '%s': %v", t.file, err))
}
}
}