mirror of
https://github.com/prometheus/node_exporter.git
synced 2025-01-16 00:10:57 -08:00
Fix go format style in mdadm collector
This commit is contained in:
parent
f6f4fda1aa
commit
c47c011063
|
@ -162,7 +162,7 @@ func parseMdstat(mdStatusFilePath string) ([]mdStatus, error) {
|
||||||
|
|
||||||
// If device is syncing at the moment, get the number of currently synced bytes,
|
// If device is syncing at the moment, get the number of currently synced bytes,
|
||||||
// otherwise that number equals the size of the device.
|
// otherwise that number equals the size of the device.
|
||||||
if strings.Contains(lines[j], "recovery") || strings.Contains(lines[j], "resync") && ! strings.Contains(lines[j], "resync=DELAYED") {
|
if strings.Contains(lines[j], "recovery") || strings.Contains(lines[j], "resync") && !strings.Contains(lines[j], "resync=DELAYED") {
|
||||||
syncedBlocks, err = evalBuildline(lines[j])
|
syncedBlocks, err = evalBuildline(lines[j])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return mdStates, fmt.Errorf("error parsing mdstat: %s", err)
|
return mdStates, fmt.Errorf("error parsing mdstat: %s", err)
|
||||||
|
|
Loading…
Reference in a new issue