mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-03-11 21:16:36 +00:00
Lint-fix: errcheck. Partial fix to #261
This commit is contained in:
committed by
Calle Pettersson
parent
e24e0dc9f5
commit
a171401f57
@@ -244,7 +244,10 @@ fileLoop:
|
||||
continue
|
||||
}
|
||||
parsedFamilies, err := parser.TextToMetricFamilies(r)
|
||||
file.Close()
|
||||
closeErr := file.Close()
|
||||
if closeErr != nil {
|
||||
log.Warnf("Error closing file: %v", err)
|
||||
}
|
||||
if err != nil {
|
||||
log.Errorf("Error parsing %q: %v", path, err)
|
||||
error = 1.0
|
||||
|
||||
Reference in New Issue
Block a user