Task on Merge channel Implement a merge function that takes an arbitrary number of channels chan string and returns a single output channel, from which all values from the input channels can be read. The input channels are closed after writing. After reading from the merged channel is complete, the program should output "ok".
Cybersecurity / InfoSec
Tell about the most interesting project or achievement in your career where there were challenges.
Have you ever solved system design tasks in an interview?
How does cursor pagination differ from offset pagination?
Merge channel task Implement a function merge that takes an arbitrary number of channels chan int and returns a single output channel from which all values from the input channels can be read. The input channels should be closed after writing. After reading from the merged channel, the program should output "ok". The merge function should work no more than 1 second, and source channels may not close.
Do you see a solution using a ticker (time.Ticker) instead of a context/timer?
Merge channel task Implement a merge function that takes an arbitrary number of chan int channels and returns a single output channel from which all values from the input channels can be read. The input channels are closed after writing. After finishing reading from the merged channel, the program should output "ok".