diff options
author | Karsten Weiss <knweiss@gmail.com> | 2017-05-14 12:54:52 +0200 |
---|---|---|
committer | Karsten Weiss <knweiss@gmail.com> | 2017-05-14 12:55:44 +0200 |
commit | af358ec800c9d3183a0d3a815a5be9f15f1eeb48 (patch) | |
tree | 6ac61ff033629df361338ec2df830e503e403faa /collector/loadavg_solaris.go | |
parent | 732f8398104e9586dfed4837dcdfb55868fc33e4 (diff) | |
download | prometheus_node_collector-af358ec800c9d3183a0d3a815a5be9f15f1eeb48.tar.bz2 prometheus_node_collector-af358ec800c9d3183a0d3a815a5be9f15f1eeb48.tar.xz prometheus_node_collector-af358ec800c9d3183a0d3a815a5be9f15f1eeb48.zip |
golint fixes: if block ends with a return statement, so drop this else and outdent its block.
Diffstat (limited to 'collector/loadavg_solaris.go')
-rw-r--r-- | collector/loadavg_solaris.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/collector/loadavg_solaris.go b/collector/loadavg_solaris.go index 97253ca..f9192aa 100644 --- a/collector/loadavg_solaris.go +++ b/collector/loadavg_solaris.go | |||
@@ -34,7 +34,6 @@ func getLoad() ([]float64, error) { | |||
34 | samples := C.getloadavg(&loadavg[0], 3) | 34 | samples := C.getloadavg(&loadavg[0], 3) |
35 | if samples > 0 { | 35 | if samples > 0 { |
36 | return []float64{float64(loadavg[0]), float64(loadavg[1]), float64(loadavg[2])}, nil | 36 | return []float64{float64(loadavg[0]), float64(loadavg[1]), float64(loadavg[2])}, nil |
37 | } else { | ||
38 | return nil, errors.New("failed to get load average") | ||
39 | } | 37 | } |
38 | return nil, errors.New("failed to get load average") | ||
40 | } | 39 | } |