fix: remove linting issues

This commit is contained in:
Simon Aronsson 2019-07-22 12:10:57 +02:00
parent 6c507433e8
commit e4e1127f8e
7 changed files with 24 additions and 19 deletions

View file

@ -50,7 +50,7 @@ func cleanupExcessWatchtowers(containers []container.Container, client container
continue
}
if cleanup == true {
if cleanup {
if err := client.RemoveImage(c); err != nil {
// logging the original here as we're just returning a count
logrus.Error(err)

View file

@ -95,7 +95,9 @@ func restartStaleContainer(container container.Container, client container.Clien
}
if params.Cleanup {
client.RemoveImage(container)
if err := client.RemoveImage(container); err != nil {
log.Error(err)
}
}
}

View file

@ -271,7 +271,7 @@ func setEnvOptStr(env string, opt string) error {
}
func setEnvOptBool(env string, opt bool) error {
if opt == true {
if opt {
return setEnvOptStr(env, "1")
}
return nil