Simplified return and bool check code

This commit is contained in:
Christian Muehlhaeuser 2019-07-19 04:54:33 +02:00
parent 857053de56
commit 16b3eaedac
No known key found for this signature in database
GPG key ID: 3CF9FA45CA1EBB7E
2 changed files with 1 additions and 4 deletions

View file

@ -144,8 +144,6 @@ func (c *DockerCommand) MonitorCLIContainerStats() {
}
cmd.Wait()
return
}
// MonitorClientContainerStats is a function
@ -193,7 +191,6 @@ func (c *DockerCommand) createClientStatMonitor(container *Container) {
}
container.MonitoringStats = false
return
}
// RefreshContainersAndServices returns a slice of docker containers

View file

@ -336,7 +336,7 @@ func (c *OSCommand) Kill(cmd *exec.Cmd) error {
// somebody got to it before we were able to, poor bastard
return nil
}
if cmd.SysProcAttr != nil && cmd.SysProcAttr.Setpgid == true {
if cmd.SysProcAttr != nil && cmd.SysProcAttr.Setpgid {
// minus sign means we're talking about a PGID as opposed to a PID
return syscall.Kill(-cmd.Process.Pid, syscall.SIGKILL)
}