daemon/stop.go
Method Daemon.containerStop
has 59 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (daemon *Daemon) containerStop(ctx context.Context, ctr *container.Container, options containertypes.StopOptions) (retErr error) {
// Cancelling the request should not cancel the stop.
ctx = context.WithoutCancel(ctx)
if !ctr.IsRunning() {
Method Daemon.containerStop
has 6 return statements (exceeds 4 allowed). Open
Open
func (daemon *Daemon) containerStop(ctx context.Context, ctr *container.Container, options containertypes.StopOptions) (retErr error) {
// Cancelling the request should not cancel the stop.
ctx = context.WithoutCancel(ctx)
if !ctr.IsRunning() {