Given the following function signature: func calculate(x int…
Given the following function signature: func calculate(x int) int Assume that function calculate has different execution times for different arguments, that is, the time taken by the call calculate(x) is different from the time taken by the call calculate(y) as long as x is not equal y. Select the definition for variable ch in the following function definition so that when function test returns, there will be no leaked goroutines. func test() { ch := [makechan] go func() { ch
Read Details