Merge pull request #131 from muesli/gosimple-fixes

Simplified return and bool check code
This commit is contained in:
Dawid Dziurla 2019-07-19 11:02:17 +02:00 committed by GitHub
commit 07e108d16c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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)
}