mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
integration-cli: fix naked returns, output vars
Remove output variables, and use explicit returns
integration-cli/check_test.go:86:3: naked return in func `testRun` with 43 lines of code (nakedret)
return
^
integration-cli/check_test.go:97:3: naked return in func `testRun` with 43 lines of code (nakedret)
return
^
integration-cli/docker_cli_cp_utils_test.go:167:2: naked return in func `makeTestContainer` with 44 lines of code (nakedret)
return
^
integration-cli/docker_api_attach_test.go:299:3: naked return in func `readTimeout` with 12 lines of code (nakedret)
return
^
integration-cli/docker_cli_cp_utils_test.go:215:2: naked return in func `startContainerGetOutput` with 11 lines of code (nakedret)
return
^
integration-cli/docker_cli_logs_test.go:276:4: naked return in func `ConsumeWithSpeed` with 18 lines of code (nakedret)
return
^
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -273,11 +273,11 @@ func ConsumeWithSpeed(reader io.Reader, chunkSize int, interval time.Duration, s
|
||||
if err == io.EOF {
|
||||
err = nil
|
||||
}
|
||||
return
|
||||
return n, err
|
||||
}
|
||||
select {
|
||||
case <-stop:
|
||||
return
|
||||
return n, err
|
||||
case <-time.After(interval):
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user