Simplify incrementation
This commit is contained in:
parent
dbaa19d13a
commit
ecfd860d15
@ -50,7 +50,6 @@ func NewGlobalStats(nodes *Nodes) (result *GlobalStats) {
|
|||||||
// if the value is not empty
|
// if the value is not empty
|
||||||
func (m CounterMap) Increment(key string) {
|
func (m CounterMap) Increment(key string) {
|
||||||
if key != "" {
|
if key != "" {
|
||||||
val := m[key]
|
m[key]++
|
||||||
m[key] = val + 1
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user