mirror of
https://github.com/ClusterCockpit/cc-metric-collector.git
synced 2026-02-13 06:31:46 +01:00
Fixed Error return value of is not checked (errcheck)
This commit is contained in:
@@ -58,7 +58,11 @@ func getStats(filename string) map[string]MemstatStats {
|
||||
if err != nil {
|
||||
cclog.Error(err.Error())
|
||||
}
|
||||
defer file.Close()
|
||||
defer func() {
|
||||
if err := file.Close(); err != nil {
|
||||
cclog.Error(err.Error())
|
||||
}
|
||||
}()
|
||||
|
||||
scanner := bufio.NewScanner(file)
|
||||
for scanner.Scan() {
|
||||
|
||||
Reference in New Issue
Block a user