mirror of
https://github.com/prometheus/statsd_exporter.git
synced 2024-12-28 16:30:35 +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