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:
Sebastiaan van Stijn
2025-02-18 19:16:01 +01:00
parent 220b3c591f
commit e1538336c7
4 changed files with 26 additions and 26 deletions

View File

@@ -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):
}
}