more lint driven refactoring

This commit is contained in:
evilsocket 2018-04-24 18:26:16 +02:00
commit 0de6f3a76e
No known key found for this signature in database
GPG key ID: 1564D7F30393A456
57 changed files with 168 additions and 241 deletions

View file

@ -59,7 +59,7 @@ func (t *Ticker) Configure() error {
var commands string
var period int
if t.Running() == true {
if t.Running() {
return session.ErrAlreadyStarted
} else if err, commands = t.StringParam("ticker.commands"); err != nil {
return err
@ -82,7 +82,7 @@ func (t *Ticker) Start() error {
log.Info("Ticker running with period %.fs.", t.Period.Seconds())
tick := time.NewTicker(t.Period)
for range tick.C {
if t.Running() == false {
if !t.Running() {
break
}