mirror of
https://github.com/taigrr/go-fastping
synced 2025-01-18 05:03:15 -08:00
Fix error message to pass http://go-lint.appspot.com/ checks
This commit is contained in:
parent
17702e6449
commit
2ce592c234
@ -188,7 +188,7 @@ func (p *Pinger) AddHandler(event string, handler interface{}) error {
|
|||||||
p.mu.Unlock()
|
p.mu.Unlock()
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
return errors.New("Receive event handler should be `func(*net.IPAddr, time.Duration)`")
|
return errors.New("receive event handler should be `func(*net.IPAddr, time.Duration)`")
|
||||||
case "idle":
|
case "idle":
|
||||||
if hdl, ok := handler.(func()); ok {
|
if hdl, ok := handler.(func()); ok {
|
||||||
p.mu.Lock()
|
p.mu.Lock()
|
||||||
@ -196,7 +196,7 @@ func (p *Pinger) AddHandler(event string, handler interface{}) error {
|
|||||||
p.mu.Unlock()
|
p.mu.Unlock()
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
return errors.New("Idle event handler should be `func()`")
|
return errors.New("idle event handler should be `func()`")
|
||||||
}
|
}
|
||||||
return errors.New("No such event: " + event)
|
return errors.New("No such event: " + event)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user