From af358ec800c9d3183a0d3a815a5be9f15f1eeb48 Mon Sep 17 00:00:00 2001 From: Karsten Weiss Date: Sun, 14 May 2017 12:54:52 +0200 Subject: [PATCH] golint fixes: if block ends with a return statement, so drop this else and outdent its block. --- collector/loadavg_solaris.go | 3 +-- collector/loadavg_unix.go | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/collector/loadavg_solaris.go b/collector/loadavg_solaris.go index 97253ca0..f9192aa0 100644 --- a/collector/loadavg_solaris.go +++ b/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") } diff --git a/collector/loadavg_unix.go b/collector/loadavg_unix.go index 4392611a..df6d652e 100644 --- a/collector/loadavg_unix.go +++ b/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") }