1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-08-06 11:02:41 +03:00

Use args struct for RunTests

There were too many position arguments
This commit is contained in:
Jesse Duffield
2023-11-29 11:39:10 +11:00
parent d8059d7f7d
commit 7e5f25e415
4 changed files with 53 additions and 52 deletions

View File

@@ -29,17 +29,17 @@ func RunCLI(testNames []string, slow bool, sandbox bool, waitForDebugger bool, r
inputDelay = SLOW_INPUT_DELAY
}
err := components.RunTests(
getTestsToRun(testNames),
log.Printf,
runCmdInTerminal,
runAndPrintFatalError,
sandbox,
waitForDebugger,
raceDetector,
inputDelay,
1,
)
err := components.RunTests(components.RunTestArgs{
Tests: getTestsToRun(testNames),
Logf: log.Printf,
RunCmd: runCmdInTerminal,
TestWrapper: runAndPrintFatalError,
Sandbox: sandbox,
WaitForDebugger: waitForDebugger,
RaceDetector: raceDetector,
InputDelay: inputDelay,
MaxAttempts: 1,
})
if err != nil {
log.Print(err.Error())
}