From 7057c64f45de6e4b2f1ae82d9b809dbd7250dfb8 Mon Sep 17 00:00:00 2001 From: Paul Gier Date: Mon, 15 Oct 2018 11:44:06 -0500 Subject: [PATCH] fix a few minor golint warnings (#1110) Signed-off-by: Paul Gier --- collector/processes_linux.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/collector/processes_linux.go b/collector/processes_linux.go index 344844b6..f321560f 100644 --- a/collector/processes_linux.go +++ b/collector/processes_linux.go @@ -36,6 +36,7 @@ func init() { registerCollector("processes", defaultDisabled, NewProcessStatCollector) } +// NewProcessStatCollector returns a new Collector exposing process data read from the proc filesystem. func NewProcessStatCollector() (Collector, error) { subsystem := "processes" return &processCollector{ @@ -111,8 +112,8 @@ func getAllocatedThreads() (int, map[string]int32, int, error) { if err != nil { return 0, nil, 0, err } - pids += 1 - procStates[stat.State] += 1 + pids++ + procStates[stat.State]++ thread += stat.NumThreads } return pids, procStates, thread, nil