Browse Source

golint fixes: if block ends with a return statement, so drop this else and outdent its block.

pull/583/head
Karsten Weiss 8 years ago
parent
commit
af358ec800
  1. 3
      collector/loadavg_solaris.go
  2. 3
      collector/loadavg_unix.go

3
collector/loadavg_solaris.go

@ -34,7 +34,6 @@ func getLoad() ([]float64, error) {
samples := C.getloadavg(&loadavg[0], 3)
if samples > 0 {
return []float64{float64(loadavg[0]), float64(loadavg[1]), float64(loadavg[2])}, nil
} else {
return nil, errors.New("failed to get load average")
}
return nil, errors.New("failed to get load average")
}

3
collector/loadavg_unix.go

@ -28,7 +28,6 @@ func getLoad() ([]float64, error) {
samples := C.getloadavg(&loadavg[0], 3)
if samples > 0 {
return []float64{float64(loadavg[0]), float64(loadavg[1]), float64(loadavg[2])}, nil
} else {
return nil, errors.New("failed to get load average")
}
return nil, errors.New("failed to get load average")
}

Loading…
Cancel
Save