misc: small fix or general refactoring i did not bother commenting

This commit is contained in:
evilsocket 2018-02-20 14:49:12 +01:00
parent 8825ecb8db
commit 35cdc59e55

View file

@ -61,13 +61,11 @@ func (t *Ticker) Configure() error {
if err, commands = t.StringParam("ticker.commands"); err != nil {
return err
}
t.Commands = session.ParseCommands(commands)
if err, period = t.IntParam("ticker.period"); err != nil {
} else if err, period = t.IntParam("ticker.period"); err != nil {
return err
}
t.Commands = session.ParseCommands(commands)
t.Period = time.Duration(period) * time.Second
return nil