fix a few minor golint warnings (#1110)

Signed-off-by: Paul Gier <pgier@redhat.com>
pull/1113/head
Paul Gier 6 years ago committed by Johannes 'fish' Ziemke
parent e8d8199072
commit 7057c64f45

@ -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

Loading…
Cancel
Save