minor cleanup

This commit is contained in:
Liam Stanley 2017-02-07 05:33:58 -05:00
parent 33dfd10a13
commit 7fa7976ff4

@ -53,7 +53,7 @@ func ParseEvent(raw string) (e *Event) {
} }
i, j := 0, 0 i, j := 0, 0
e = new(Event) e = &Event{}
if raw[0] == prefixTag { if raw[0] == prefixTag {
// Tags end with a space. // Tags end with a space.
@ -123,7 +123,6 @@ func ParseEvent(raw string) (e *Event) {
} }
return e return e
} }
// Len calculates the length of the string representation of event. // Len calculates the length of the string representation of event.
@ -338,10 +337,7 @@ type EventLimiter struct {
func (el *EventLimiter) loop() { func (el *EventLimiter) loop() {
// This should exit itself once el.Stop() is called. // This should exit itself once el.Stop() is called.
for t := range el.tick.C { for t := range el.tick.C {
select { el.throttle <- t
case el.throttle <- t:
default:
}
} }
} }