diff options
author | Tobias Schmidt <tobidt@gmail.com> | 2017-02-28 14:47:20 -0400 |
---|---|---|
committer | Tobias Schmidt <tobidt@gmail.com> | 2017-02-28 16:04:25 -0400 |
commit | 922e74d58fddd257cf9a0a323d95932c6a66a29a (patch) | |
tree | e07b23d009fad52d8757bb6a313c3b9fac07e2d8 /collector/helper.go | |
parent | 084e585c2af0a886dad527dc67184a4e6bc10747 (diff) | |
download | prometheus_node_collector-922e74d58fddd257cf9a0a323d95932c6a66a29a.tar.bz2 prometheus_node_collector-922e74d58fddd257cf9a0a323d95932c6a66a29a.tar.xz prometheus_node_collector-922e74d58fddd257cf9a0a323d95932c6a66a29a.zip |
Remove unnecessarily named return variables
Named return variables should only be used to describe the returned type
further, e.g. `err error` doesn't add any new information and is just
stutter.
Diffstat (limited to 'collector/helper.go')
-rw-r--r-- | collector/helper.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/collector/helper.go b/collector/helper.go index 271c626..60168f2 100644 --- a/collector/helper.go +++ b/collector/helper.go | |||
@@ -20,7 +20,8 @@ import ( | |||
20 | "strings" | 20 | "strings" |
21 | ) | 21 | ) |
22 | 22 | ||
23 | func splitToInts(str string, sep string) (ints []int, err error) { | 23 | func splitToInts(str, sep string) ([]int, error) { |
24 | var ints []int | ||
24 | for _, part := range strings.Split(str, sep) { | 25 | for _, part := range strings.Split(str, sep) { |
25 | i, err := strconv.Atoi(part) | 26 | i, err := strconv.Atoi(part) |
26 | if err != nil { | 27 | if err != nil { |