fix a few minor golint warnings (#1110)

Signed-off-by: Paul Gier <pgier@redhat.com>
This commit is contained in:
Paul Gier 2018-10-15 11:44:06 -05:00 committed by Johannes 'fish' Ziemke
parent e8d8199072
commit 7057c64f45
1 changed files with 3 additions and 2 deletions

View File

@ -36,6 +36,7 @@ func init() {
registerCollector("processes", defaultDisabled, NewProcessStatCollector) registerCollector("processes", defaultDisabled, NewProcessStatCollector)
} }
// NewProcessStatCollector returns a new Collector exposing process data read from the proc filesystem.
func NewProcessStatCollector() (Collector, error) { func NewProcessStatCollector() (Collector, error) {
subsystem := "processes" subsystem := "processes"
return &processCollector{ return &processCollector{
@ -111,8 +112,8 @@ func getAllocatedThreads() (int, map[string]int32, int, error) {
if err != nil { if err != nil {
return 0, nil, 0, err return 0, nil, 0, err
} }
pids += 1 pids++
procStates[stat.State] += 1 procStates[stat.State]++
thread += stat.NumThreads thread += stat.NumThreads
} }
return pids, procStates, thread, nil return pids, procStates, thread, nil