mirror of
https://github.com/prometheus/statsd_exporter.git
synced 2024-11-26 09:11:01 +00:00
consensed if/else statement
This commit is contained in:
parent
3efcef6229
commit
9cd4b974e4
1 changed files with 1 additions and 3 deletions
|
@ -384,9 +384,7 @@ func (l *StatsDListener) handlePacket(packet []byte, e chan<- Events) {
|
|||
valueStr, statType := components[0], components[1]
|
||||
|
||||
var relative = false
|
||||
if strings.Index(valueStr, "+") == 0 {
|
||||
relative = true
|
||||
} else if strings.Index(valueStr, "-") == 0 {
|
||||
if strings.Index(valueStr, "+") == 0 || strings.Index(valueStr, "-") == 0 {
|
||||
relative = true
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue