Go Tee-Channel: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 3: Line 3:
=Overview=
=Overview=
This pattern allows duplicating and splitting the values coming in from a channel into two different output channels.
This pattern allows duplicating and splitting the values coming in from a channel into two different output channels.
=<tt>tee()</tt>=
This example uses <code>orDone()</code> described in the [[Go_OR-Done-Channel_Pattern#orDone()|OR-Done-Channel Pattern]] section.
<syntaxhighlight lang='go'>
</syntaxhighlight>

Revision as of 23:06, 5 February 2024

Internal

Overview

This pattern allows duplicating and splitting the values coming in from a channel into two different output channels.

tee()

This example uses orDone() described in the OR-Done-Channel Pattern section.