mirror of
https://github.com/jwetzell/showbridge-go.git
synced 2026-04-27 05:15:47 +00:00
cleanup error messages
This commit is contained in:
4
timer.go
4
timer.go
@@ -21,13 +21,13 @@ func init() {
|
||||
|
||||
duration, ok := params["duration"]
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("timer requires a duration parameter")
|
||||
return nil, fmt.Errorf("gen.timer requires a duration parameter")
|
||||
}
|
||||
|
||||
durationNum, ok := duration.(float64)
|
||||
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("timer duration must be number")
|
||||
return nil, fmt.Errorf("gen.timer duration must be a number")
|
||||
}
|
||||
|
||||
return &Timer{Duration: uint32(durationNum), config: config}, nil
|
||||
|
||||
Reference in New Issue
Block a user