mirror of
https://github.com/jesseduffield/lazydocker.git
synced 2026-07-25 08:31:03 +00:00
Merge pull request #131 from muesli/gosimple-fixes
Simplified return and bool check code
This commit is contained in:
commit
07e108d16c
2 changed files with 1 additions and 4 deletions
|
|
@ -144,8 +144,6 @@ func (c *DockerCommand) MonitorCLIContainerStats() {
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd.Wait()
|
cmd.Wait()
|
||||||
|
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// MonitorClientContainerStats is a function
|
// MonitorClientContainerStats is a function
|
||||||
|
|
@ -193,7 +191,6 @@ func (c *DockerCommand) createClientStatMonitor(container *Container) {
|
||||||
}
|
}
|
||||||
|
|
||||||
container.MonitoringStats = false
|
container.MonitoringStats = false
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// RefreshContainersAndServices returns a slice of docker containers
|
// RefreshContainersAndServices returns a slice of docker containers
|
||||||
|
|
|
||||||
|
|
@ -336,7 +336,7 @@ func (c *OSCommand) Kill(cmd *exec.Cmd) error {
|
||||||
// somebody got to it before we were able to, poor bastard
|
// somebody got to it before we were able to, poor bastard
|
||||||
return nil
|
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
|
// minus sign means we're talking about a PGID as opposed to a PID
|
||||||
return syscall.Kill(-cmd.Process.Pid, syscall.SIGKILL)
|
return syscall.Kill(-cmd.Process.Pid, syscall.SIGKILL)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue